Package org.ametys.runtime.exception
Class DefaultExceptionHandler
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.runtime.exception.DefaultExceptionHandler
-
- All Implemented Interfaces:
ExceptionHandler,Contextualizable,LogEnabled,ThreadSafe
public class DefaultExceptionHandler extends AbstractLogEnabled implements ExceptionHandler, ThreadSafe, Contextualizable
Simple ExceptionHandler pointing to the default error XSL.
InWEB-INF/stylesheets/erroror in the runtime jar inpages/error/error.xsl
-
-
Field Summary
Fields Modifier and Type Field Description private Context_cocoonContext-
Fields inherited from interface org.ametys.runtime.exception.ExceptionHandler
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultExceptionHandler()Constructor as componentDefaultExceptionHandler(Context context)Constructor for default behavior when application is not starting
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextualize(Context context)StringgetExceptionXSLURI(String code)Returns an URI corresponding to the XSL responsible to render the Exception-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_cocoonContext
private Context _cocoonContext
-
-
Constructor Detail
-
DefaultExceptionHandler
public DefaultExceptionHandler()
Constructor as component
-
DefaultExceptionHandler
DefaultExceptionHandler(Context context)
Constructor for default behavior when application is not starting- Parameters:
context- The cocoon context
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
getExceptionXSLURI
public String getExceptionXSLURI(String code)
Description copied from interface:ExceptionHandlerReturns an URI corresponding to the XSL responsible to render the Exception- Specified by:
getExceptionXSLURIin interfaceExceptionHandler- Parameters:
code- the HTTP response status code corresponding to the handled exception- Returns:
- an URI corresponding to the XSL responsible to render the Exception
-
-