-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Caleb Cushing opened SPR-14942 and commented
SPELL parsing a valid expression, there is still more data in expression
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):
the linked SO might have had ```
Exception in thread "main" org.springframework.expression.spel.SpelParseException: EL1041E:(pos 6) at "ello"
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:
- SpEL: Make EvaluationException more informative with Expression [SPR-10938] #15566 SpEL: Make EvaluationException more informative with Expression