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

Handle receiving no exception to an error listener correctly #14

Open
51-code opened this issue Jul 25, 2024 · 0 comments
Open

Handle receiving no exception to an error listener correctly #14

51-code opened this issue Jul 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@51-code
Copy link

51-code commented Jul 25, 2024

Describe the bug

From investigating the root cause of #13, it was noticed that the RecognitionException given as a parameter in an ErrorListener might be null in some cases:
RecognitionExceptions docs: "It is null in the case where the parser was able to recover in line without exiting the surrounding rule."

Expected behavior

Should be recognized and logged properly.

How to reproduce

E.g. the query || has this behavior.

Screenshots

Software version

pth_03 version: 5.11.0

Desktop (please complete the following information if relevant):

  • OS:
  • Browser:
  • Version:

Additional context

The NullPointerException that resulted from this is handled in #13, but the fix is rather superficial. It should be investigated if this specific case requires some other response than the usual syntax error.

@51-code 51-code added the bug Something isn't working label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant