Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash On Unknown Directive #4

Open
tomspilman opened this issue Jan 20, 2016 · 0 comments
Open

Crash On Unknown Directive #4

tomspilman opened this issue Jan 20, 2016 · 0 comments

Comments

@tomspilman
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant