You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application is taking RSQLParserException and converting it to our application specific application.
Now the message created from ParseException::initialise is not usable by our application and I wanted to create my own message using its 3 properties. Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal
I am able to use expectedTokenSequencesVal and tokenImageVal, but since cz.jirutka.rsql.parser.Token is not the public class I am unable to use currentTokenVal. Is cz.jirutka.rsql.parser.Token Intentionally not a public class. Is there alternative way to overwrite ParseException::initialise or some way I can create my own message.
The text was updated successfully, but these errors were encountered:
Can you catch this exception and try to convert it to your exception with your own message? is it possible?
I mean put that part in a try/catch block and in the catch block, throw your exception, something like this:
try {
NoderootNode = newRSQLParser().parse(query);
spec = rootNode.accept(newCustomRsqlVisitor<Product>());
} catch (RSQLParserExceptionex) {
thrownewResponseStatusException(HttpStatus.BAD_REQUEST, "Dude, yor query is wrong! check it and try again :)");
}
My application is taking RSQLParserException and converting it to our application specific application.
Now the message created from
ParseException::initialise
is not usable by our application and I wanted to create my own message using its 3 properties.Token currentTokenVal
,int[][] expectedTokenSequencesVal
,String[] tokenImageVal
I am able to use
expectedTokenSequencesVal
andtokenImageVal
, but sincecz.jirutka.rsql.parser.Token
is not the public class I am unable to use currentTokenVal. Iscz.jirutka.rsql.parser.Token
Intentionally not a public class. Is there alternative way to overwriteParseException::initialise
or some way I can create my own message.The text was updated successfully, but these errors were encountered: