Skip to content

Crash On Unknown Directive #4

@tomspilman

Description

@tomspilman

If you pass a file with any unknown directive like:

#notgood

You get a crash processing a token:

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at CppNet.Preprocessor._token()
   at CppNet.Preprocessor.token()

This probably shouldn't crash... it should probably return some unknown directive type. At worst it should output a reasonable error message and fail to parse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions