Include expression string in SpelParseException [SPR-14942] #19509
Comments
Juergen Hoeller commented Back in 4.0, #15566 already attempted to include the full expression string in the exception message but failed to cover the We're including the detailed string including the quoted expression in all cases now. To be backported to 4.3.5. I'm afraid 4.2.9 should rather stay as-is since existing code may rely on the old message structure, i.e. the exception message starting with the error code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Caleb Cushing opened SPR-14942 and commented
in this exception, examples of which can be found http://stackoverflow.com/q/29534883/206466
spring will give you the column number, the problem is if you have, say a Spring Data JPA query with multiple spring expressions, figuring out what, for example column 66 is can be painful.
It would be nice if the exception included the piece of string leading up to or after. So it's easier to find in your code.
so instead of ```
Exception in thread "main" org.springframework.expression.spel.SpelParseException: EL1041E:(pos 6):
in my case the exception was near right parens, because I had a duplicate right parens but I had 4 different spel expressions in my query, all of them using T() to wrap an enum.
Affects: 4.2.8
Issue Links:
Referenced from: commits 5ca10b1, 14eba50
The text was updated successfully, but these errors were encountered: