Package org.apache.velocity.app.event
Interface MethodExceptionEventHandler
-
- All Superinterfaces:
EventHandler
- All Known Implementing Classes:
EventExample
,PrintExceptions
public interface MethodExceptionEventHandler extends EventHandler
Event handler called when a method throws an exception. This gives the application a chance to deal with it and either return something nice, or throw. Please return what you want rendered into the output stream.- Version:
- $Id$
- Author:
- Will Glass-Husain, Geir Magnusson Jr.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
methodException(Context context, Class<?> claz, String method, Exception e, Info info)
Called when a method throws an exception.
-
-
-
Method Detail
-
methodException
Object methodException(Context context, Class<?> claz, String method, Exception e, Info info)
Called when a method throws an exception. Only the first registered MethodExceptionEventHandler is called. If none are registered a MethodInvocationException is thrown.- Parameters:
context
- current contextclaz
- the class of the object the method is being applied tomethod
- the methode
- the thrown exceptioninfo
- contains template, line, column details- Returns:
- an object to insert in the page
- Throws:
RuntimeException
- an exception to be thrown instead inserting an object
-
-