2 * Copyright (C) 2016 Roland Haeder<roland@mxchange.org>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jcoreee.exceptions;
19 import javax.faces.context.ExceptionHandler;
20 import javax.faces.context.ExceptionHandlerFactory;
23 * A custom factory for exception handler. This class is heavily based on this
26 * 1: https://wmarkito.wordpress.com/2012/04/05/adding-global-exception-handling-using-jsf-2-x-exceptionhandler/
28 * @author Roland Haeder<roland@mxchange.org>
30 public class CustomExceptionHandlerFactory extends ExceptionHandlerFactory {
33 * Parent exception handler
35 private final ExceptionHandlerFactory parent;
37 public CustomExceptionHandlerFactory (final ExceptionHandlerFactory parent) {
43 public ExceptionHandler getExceptionHandler () {
45 ExceptionHandler handler = new CustomExceptionHandler(this.parent.getExceptionHandler());