-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Overview
While working on #33013, I noticed that we don't unwrap an InvocationTargetException
in SpEL's FunctionReference
; however, we do unwrap those in ConstructorReference
and MethodReference
.
For example, currently one may encounter an exception like this:
SpelEvaluationException: EL1023E: A problem occurred whilst attempting to invoke the function 'formatObjectVarargs': 'null'
That 'null'
comes from the fact that an InvocationTargetException
doesn't have a message. Instead, we should unwrap the InvocationTargetException
to use its cause for the exception message, resulting in something like this:
SpelEvaluationException: EL1023E: A problem occurred whilst attempting to invoke the function 'formatObjectVarargs': 'Format specifier '%s''
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement