Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parser::parse_term
usesdynamic_cast
to attempt to see if the LHS of an expression can be treated as aString_Schema
in order to check if string interpolation is in play. Unfortunately, it relies ondynamic_cast
throwing an exception if the cast fails, which is not how C++11 behaves. An exception is only thrown fromdynamic_cast
when references are being cast, not pointers (since a reference cannot be null, but a pointer can):http://stackoverflow.com/questions/16476613/when-dynamic-cast-will-throw-exception-in-case-used-with-pointer
The change in this pull request removes the try/catch construct, and replaces it with a simple check to see if the pointer is null or not.