com.getsnappy.w20
Class DefaultMessageApplicationErrorHandler

java.lang.Object
  extended by com.getsnappy.w20.DefaultMessageApplicationErrorHandler
All Implemented Interfaces:
ApplicationErrorHandler

public class DefaultMessageApplicationErrorHandler
extends java.lang.Object
implements ApplicationErrorHandler

The DefaultMessageapplicationErrorHandler simply outputs a generic message to out. For example when used with the default constructor the following code is execute by handleException out.write("An Error has Occured!");

Author:
brian
See Also:
ApplicationInstance

Constructor Summary
DefaultMessageApplicationErrorHandler()
          Sets the defaultMessage to "An Error has Occured!"
DefaultMessageApplicationErrorHandler(java.lang.String defaultMessage)
          Sets the defaultMessage to the param defaultMessage.
 
Method Summary
 void handleException(java.lang.Exception e, java.io.Writer out, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This error handler simply prints out defaultMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageApplicationErrorHandler

public DefaultMessageApplicationErrorHandler()
Sets the defaultMessage to "An Error has Occured!"


DefaultMessageApplicationErrorHandler

public DefaultMessageApplicationErrorHandler(java.lang.String defaultMessage)
Sets the defaultMessage to the param defaultMessage.

Parameters:
defaultMessage -
Method Detail

handleException

public void handleException(java.lang.Exception e,
                            java.io.Writer out,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws java.lang.Exception
This error handler simply prints out defaultMessage

Specified by:
handleException in interface ApplicationErrorHandler
Parameters:
out - is not used in this implementation
request - is not used in this implementation
response - is not used in this implementation
Throws:
java.lang.Exception - always re-throw e out unmodified