Skip to content

Add HandlerMethod as possible parameter to @ExceptionHandler method [SPR-10047] #14681

@spring-projects-issues

Description

@spring-projects-issues

Pavel Orehov opened SPR-10047 and commented

Currently the @ExceptionHandler method can not contain HandlerMethod as method parameter as it is not passed by spring framework.
It could be very helpful for investigating throwing exception method, for example, for custom annotations.
The workaround that I found is to create mvc interceptor and pass the MethodHandler via ServletRequest.attributtes.


Affects: 3.2 RC2

Issue Links:

1 votes, 3 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions