01: /*
02: * Created on Nov 17, 2005
03: */
04: package uk.org.ponder.rsf.flow.errors;
05:
06: import uk.org.ponder.rsf.viewstate.AnyViewParameters;
07: import uk.org.ponder.rsf.viewstate.ViewParameters;
08:
09: /** Implemented by a bean representing a strategy for dealing with exceptions
10: * which occur during rendering of a view. The bean is expected to return
11: * the ViewParameters of a new (and hopefully more valid view) that the
12: * client is to be redirected to in the event of this level-1 error. If an
13: * error occurs whilst rendering this page, a fatal error will be declared
14: * (customisable by {@link uk.org.ponder.rsf.processor.FatalErrorHandler}).
15: * </p>
16: * A strategy may return <code>null</code> to indicate it defers to some
17: * later strategy.
18: * @author Antranig Basman (amb26@ponder.org.uk)
19: *
20: */
21:
22: public interface ViewExceptionStrategy {
23: /**
24: * Handle an exception raised from a ViewProducer.
25: * @param e The raised exception.
26: * @param viewparams The ViewParameters of the view being rendered when the
27: * exception was encountered.
28: * @return ViewParameters to which the client is to be redirected.
29: */
30: public AnyViewParameters handleException(Exception e,
31: ViewParameters viewparams);
32: }
|