Unwrap InvocationTargetException
in SpEL's FunctionReference
#33174
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Overview
While working on #33013, I noticed that we don't unwrap an
InvocationTargetException
in SpEL'sFunctionReference
; however, we do unwrap those inConstructorReference
andMethodReference
.For example, currently one may encounter an exception like this:
That
'null'
comes from the fact that anInvocationTargetException
doesn't have a message. Instead, we should unwrap theInvocationTargetException
to use its cause for the exception message, resulting in something like this:The text was updated successfully, but these errors were encountered: