Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class YourExceptionHandler extends FullAjaxExceptionHandler {
- public YourExceptionHandler(ExceptionHandler wrapped) {
- super(wrapped);
- }
- @Override
- public void handle() throws FacesException {
- Iterator<ExceptionQueuedEvent> events = getUnhandledExceptionQueuedEvents().iterator();
- if (events.hasNext() && events.next().getContext().getException() instanceof AbortProcessingException) {
- return; // Ignore (and don't log).
- }
- super.handle(); // Continue to FullAjaxExceptionHandler.
- }
- }
- public class YourExceptionHandlerFactory extends ExceptionHandlerFactory {
- private ExceptionHandlerFactory wrapped;
- public YourExceptionHandlerFactory(ExceptionHandlerFactory wrapped) {
- this.wrapped = wrapped;
- }
- @Override
- public ExceptionHandler getExceptionHandler() {
- return new YourExceptionHandler(getWrapped().getExceptionHandler());
- }
- @Override
- public ExceptionHandlerFactory getWrapped() {
- return wrapped;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement