org.apache.tapestry5.internal.services
Class DefaultRequestExceptionHandler

java.lang.Object
  extended by org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler
All Implemented Interfaces:
RequestExceptionHandler

public class DefaultRequestExceptionHandler
extends Object
implements RequestExceptionHandler

Default implementation of RequestExceptionHandler that displays the standard ExceptionReport page. The page must implement the ExceptionReporter interface.


Constructor Summary
DefaultRequestExceptionHandler(RequestPageCache pageCache, PageResponseRenderer renderer, org.slf4j.Logger logger, String pageName, Response response)
           
 
Method Summary
 void handleRequestException(Throwable exception)
          Reponsible for handling the error in some way and providing some response to the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRequestExceptionHandler

public DefaultRequestExceptionHandler(RequestPageCache pageCache,
                                      PageResponseRenderer renderer,
                                      org.slf4j.Logger logger,
                                      @Symbol(value="tapestry.exception-report-page")
                                      String pageName,
                                      Response response)
Method Detail

handleRequestException

public void handleRequestException(Throwable exception)
                            throws IOException
Description copied from interface: RequestExceptionHandler
Reponsible for handling the error in some way and providing some response to the client. A default implementation may render an error response page.

The handler is also responsible for setting the response status and the X-Tapestry-ErrorMessage response header. These are very important in Ajax requests to allow the client-side logic to detect the error and present it to the user.

Specified by:
handleRequestException in interface RequestExceptionHandler
Parameters:
exception - uncaught exception to be reported
Throws:
IOException


Copyright © 2003-2012 The Apache Software Foundation.