|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bbqjs.spring.mvc.ErrorController
public class ErrorController
Maps exceptions to error codes. Set the errorCodes map to do custom error mapping.
Field Summary | |
---|---|
static int |
EPIC_FAIL_CODE
Default error code. |
static String |
X_BBQ_RESPONSE_MESSAGE
|
static String |
X_BBQ_RESPONSE_TYPE
|
Constructor Summary | |
---|---|
ErrorController()
|
Method Summary | |
---|---|
protected void |
encounteredError(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception exception)
Override this to do logging, etc |
protected int |
getErrorCode(Exception exception)
|
protected String |
getErrorMessage(Exception exception)
|
protected org.springframework.web.servlet.ModelAndView |
getModelAndView(Exception forException)
|
org.springframework.web.servlet.ModelAndView |
resolveException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
Exception exception)
|
void |
setDefaultErrorView(String defaultErrorView)
The name of the default view which is returned if ErrorController#errorViews doesn't contain a specific view for the thrown exception. |
void |
setErrorCodes(Map<Class<?>,Integer> errorCodes)
|
void |
setErrorViews(Map<Class<?>,String> errorViews)
A list of view template names keyed by exception class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EPIC_FAIL_CODE
public static final String X_BBQ_RESPONSE_TYPE
public static final String X_BBQ_RESPONSE_MESSAGE
Constructor Detail |
---|
public ErrorController()
Method Detail |
---|
public org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, Exception exception)
resolveException
in interface org.springframework.web.servlet.HandlerExceptionResolver
protected void encounteredError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Exception exception)
exception
- protected String getErrorMessage(Exception exception) throws UnsupportedEncodingException
UnsupportedEncodingException
protected int getErrorCode(Exception exception)
protected org.springframework.web.servlet.ModelAndView getModelAndView(Exception forException)
public void setErrorCodes(Map<Class<?>,Integer> errorCodes)
public void setErrorViews(Map<Class<?>,String> errorViews)
errorViews
- public void setDefaultErrorView(String defaultErrorView)
defaultErrorView
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |