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/error
or 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 void
contextualize(Context context)
String
getExceptionXSLURI(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:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getExceptionXSLURI
public String getExceptionXSLURI(String code)
Description copied from interface:ExceptionHandler
Returns an URI corresponding to the XSL responsible to render the Exception- Specified by:
getExceptionXSLURI
in 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
-
-