Class MethodExceptionHandler
java.lang.Object
org.apache.velocity.app.event.implement.PrintExceptions
com.nomagic.magicreport.engine.velocity.MethodExceptionHandler
- All Implemented Interfaces:
org.apache.velocity.app.event.EventHandler,org.apache.velocity.app.event.MethodExceptionEventHandler,org.apache.velocity.util.RuntimeServicesAware
@OpenApiAll
public class MethodExceptionHandler
extends org.apache.velocity.app.event.implement.PrintExceptions
Event handler called when a method throws an exception. By default Velocity return an exception Object in
methodException(Class, String, Exception) and reference to method name is corrupted. This class will
manage it manually to avoid error reference in Velocity.- Since:
- Jun 18, 2007
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmethodException(Class clazz, String method, Exception e) Render the method exception, and optionally the exception message and stack trace.Methods inherited from class org.apache.velocity.app.event.implement.PrintExceptions
methodException, setRuntimeServices
-
Constructor Details
-
MethodExceptionHandler
public MethodExceptionHandler()
-
-
Method Details
-
methodException
Render the method exception, and optionally the exception message and stack trace. This method always returnnullto keep valid reference and property pass toVelocityReferenceHandler.invalidGetMethod(org.apache.velocity.context.Context, java.lang.String, java.lang.Object, java.lang.String, org.apache.velocity.util.introspection.Info)- Parameters:
clazz- the class of the object the method is being applied tomethod- the methode- the thrown exception- Returns:
- an
nullobject. - Throws:
Exception- an exception to be thrown instead inserting an object
-