-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Exclude an exception from @ExceptionHandler [SPR-13932] #18504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Rossen Stoyanchev commented I've reduced the log level in For anyone interested in the features please comment/vote. |
Martin Macko commented Hi, I've tried to implement this feature. Could you possibly look at my code and do a review? Thanks. |
Bill Chen commented
|
Rather than an exclusion flag, it seems this could be done with two |
Hi @rstoyanchev, I hope you don't mind If I explain our use case in this closed issue We have a globalErrorHandler with We also have business exceptions (RedirectExceptions) that we'd like to handle in a custom HandleInterceptor, in its afterCompletion method. As you know this does not work because the exception has already been handled by our globalErrorHandler because we can not make it ignore these kind of business exceptions. |
Uh oh!
There was an error while loading. Please reload this page.
Bill Chen opened SPR-13932 and commented
As seen in the referenced SO question, if one wants a blanket handler for all Exceptions apart from a few, one will have to rethrow the unhandled exception in the
@ExceptionHandler
method, which causes a horrendousERROR
to be logged.Can some facility be provided to statically (via the annotation) or, even better, dynamically skip an exception in a handler?
Affects: 4.2.4
Reference URL: http://stackoverflow.com/q/35267756/499922
Issue Links:
@ExceptionHandler
at higher level than debugReferenced from: commits cdfcc23, 6ef2d82
The text was updated successfully, but these errors were encountered: