com.elasticpath.cmweb.exceptionhandler
Class EpSystemExceptionHandler

java.lang.Object
  extended by com.elasticpath.cmweb.exceptionhandler.EpSystemExceptionHandler
All Implemented Interfaces:
org.springframework.core.Ordered, org.springframework.web.servlet.HandlerExceptionResolver

public class EpSystemExceptionHandler
extends java.lang.Object
implements org.springframework.web.servlet.HandlerExceptionResolver, org.springframework.core.Ordered

EpSystemExceptionHandler is to handle any exception that is bubbled up to the web layer.


Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
EpSystemExceptionHandler()
           
 
Method Summary
 int getOrder()
          Gets the order of the current exception handler.
 org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler, java.lang.Exception exception)
          Receive any exception that is not caught under contoller layer.
 void setOrder(int order)
          Sets the order of the current exception handler.
 void setViewName(java.lang.String viewName)
          Sets the static view name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EpSystemExceptionHandler

public EpSystemExceptionHandler()
Method Detail

getOrder

public int getOrder()
Gets the order of the current exception handler.

Specified by:
getOrder in interface org.springframework.core.Ordered
Returns:
the order

resolveException

public org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     java.lang.Object handler,
                                                                     java.lang.Exception exception)
Receive any exception that is not caught under contoller layer. Log the excpetion and show the generic error page.

Specified by:
resolveException in interface org.springframework.web.servlet.HandlerExceptionResolver
Parameters:
request - - the request
response - - the response
handler - - the current handler.
exception - - the exception to be handled.
Returns:
the model and view for display.

setOrder

public void setOrder(int order)
Sets the order of the current exception handler.

Parameters:
order - the order to set

setViewName

public final void setViewName(java.lang.String viewName)
Sets the static view name.

Parameters:
viewName - - the static view name.