org.openmrs.util
Class VelocityExceptionHandler

java.lang.Object
  extended by org.openmrs.util.VelocityExceptionHandler
All Implemented Interfaces:
org.apache.velocity.app.event.EventHandler, org.apache.velocity.app.event.MethodExceptionEventHandler

public class VelocityExceptionHandler
extends java.lang.Object
implements org.apache.velocity.app.event.MethodExceptionEventHandler

Class to safely catch velocity exceptions


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.MethodExceptionEventHandler
org.apache.velocity.app.event.MethodExceptionEventHandler.MethodExceptionExecutor
 
Constructor Summary
VelocityExceptionHandler()
           
 
Method Summary
 java.lang.Object methodException(java.lang.Class claz, java.lang.String method, java.lang.Exception e)
          When a user-supplied method throws an exception, the MethodExceptionEventHandler is invoked with the Class, method name and thrown Exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityExceptionHandler

public VelocityExceptionHandler()
Method Detail

methodException

public java.lang.Object methodException(java.lang.Class claz,
                                        java.lang.String method,
                                        java.lang.Exception e)
                                 throws java.lang.Exception
When a user-supplied method throws an exception, the MethodExceptionEventHandler is invoked with the Class, method name and thrown Exception. The handler can either return a valid Object to be used as the return value of the method call, or throw the passed-in or new Exception, which will be wrapped and propagated to the user as a MethodInvocationException

Specified by:
methodException in interface org.apache.velocity.app.event.MethodExceptionEventHandler
Throws:
java.lang.Exception
See Also:
MethodExceptionEventHandler.methodException(java.lang.Class, java.lang.String, java.lang.Exception)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change