wicket.request.compound
Class DefaultExceptionResponseStrategy

java.lang.Object
  extended by wicket.request.compound.DefaultExceptionResponseStrategy
All Implemented Interfaces:
IExceptionResponseStrategy

public class DefaultExceptionResponseStrategy
extends java.lang.Object
implements IExceptionResponseStrategy

Default implementation of IExceptionResponseStrategy. Depending on the setting it returns a (pluggable) exception page or a blank page, and it passes the exception through to the current request cycle by calling RequestCycle.onRuntimeException(Page, RuntimeException).

Author:
Eelco Hillenius, Johan Compagner, Igor Vaynberg (ivaynberg)

Constructor Summary
DefaultExceptionResponseStrategy()
          Construct.
 
Method Summary
protected  Page onRuntimeException(Page page, java.lang.RuntimeException e)
          This method is called when a runtime exception is thrown, just before the actual handling of the runtime exception.
 void respond(RequestCycle requestCycle, java.lang.RuntimeException e)
          Whenever a unhandled exception is encountered during the processing of a request cycle, this method is called to respond to the request in a proper way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExceptionResponseStrategy

public DefaultExceptionResponseStrategy()
Construct.

Method Detail

respond

public final void respond(RequestCycle requestCycle,
                          java.lang.RuntimeException e)
Description copied from interface: IExceptionResponseStrategy
Whenever a unhandled exception is encountered during the processing of a request cycle, this method is called to respond to the request in a proper way.

Specified by:
respond in interface IExceptionResponseStrategy
Parameters:
requestCycle - the current request cycle
e - an uncaught exception
See Also:
IExceptionResponseStrategy.respond(wicket.RequestCycle, java.lang.RuntimeException)

onRuntimeException

protected Page onRuntimeException(Page page,
                                  java.lang.RuntimeException e)
This method is called when a runtime exception is thrown, just before the actual handling of the runtime exception. This implemention passes the call through to RequestCycle.onRuntimeException(Page, RuntimeException). Note that if you override this method or provide a whole new implementation of IExceptionResponseStrategy alltogether, RequestCycle.onRuntimeException(Page, RuntimeException) will not be supported.

Parameters:
page - Any page context where the exception was thrown
e - The exception
Returns:
Any error page to redirect to


Copyright © 2004-2007 Wicket developers. All Rights Reserved.