-
Notifications
You must be signed in to change notification settings - Fork 363
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
log only errors for parameter matching #846
Conversation
- MismatchException is used to consume all separators and this is not an error - only create an error message if the closing bracket token is not following an comma token (might not happen)
@@ -743,19 +743,20 @@ private int matchArguments(List<Token> tokens, List<Token> arguments) { | |||
break; | |||
} | |||
} while (true); | |||
|
|||
} catch (MismatchException me) { | |||
LOG.debug("Mismatch: expected ','got: '" + rest.get(0).getValue() + "'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this then be error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically this message is:
Mismatch: expected ',' got: ')'
This is the reason for the exception but not an error. Anything different than ',' or ')' is an error. This message could be an error if the ')' case is not reported.
ok, but then do we even need to do the debug print. if running with -X it will just print loads of not needed stuff. right? |
Yes, the debug information might be huge. I removed this code line. Please check the update. |
Code review only without testing with sample 👍 |
Try still to run this before merging |
looks good: 👍 |
error
following an comma token (might not happen)