-
Notifications
You must be signed in to change notification settings - Fork 34
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
Missing ; in flux file when using Flux/main throws no exception #421
Comments
dr0i
added a commit
that referenced
this issue
Jan 14, 2022
If a RecognitionException occurs in FluxParser it was catched. So callers had no chance to be aware of the Exception. As it's not possible to create a new RecognitionException with a customized error message (and throw this new RecognitionException) and also to be backwards compatibel (RuntimeException are referred to as unchecked exceptions and the code would compile just as before) no checked Exception was used but a RuntimeException with the customized error message.
dr0i
added a commit
that referenced
this issue
Jan 14, 2022
If a `RecognitionException` occurs in `FluxParser` it was catched. So callers had no chance to be aware of the Exception. As it's not possible to create a new `RecognitionException` with a customized error message (and throw this new `RecognitionException`) and also to be backwards compatibel (`RuntimeExceptions` are referred to as unchecked exceptions and the code would compile just as before) no checked Exception is thrown but a `RuntimeException` with the customized error message.
Deployed to test, see http://test.lobid.org/playground/. |
Yes, great! That works :) |
blackwinter
added a commit
that referenced
this issue
Jan 20, 2022
blackwinter
added a commit
that referenced
this issue
Jan 20, 2022
All `RecognitionException`s are finally caught in the `flux` catch handler which can then take the appropriate measures.
dr0i
added a commit
that referenced
this issue
Feb 3, 2022
dr0i
added a commit
that referenced
this issue
Feb 3, 2022
This guarantees (more) exceptions to be thrown. Note that it isn't sufficient to just add a default (or: minimal) catch handler to all expressions, e.g. adding that to the 'atom' expression would result in an not detailed enough message. The overriding of 'recoverFromMismatchedToken' guarantees the throwing of an exception when attempting a recover (before that would be reported but not thrown (see metafacture/metafacture-playground#84 )). - use 'FluxParseException' instead of 'RuntimeException' - add some more tests
Should be automatically deployed tomorrow morning. |
dr0i
added a commit
that referenced
this issue
Feb 7, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the implementation of metafacture/metafacture-playground#50 I found out, when using the Flux/main method to process a flux file, that a missing ; at the end of the flux file does not throw an exception. In the console is printed
line 0:-1 mismatched input '<EOF>' expecting ';'
The text was updated successfully, but these errors were encountered: