public class PrintExceptions extends java.lang.Object implements MethodExceptionEventHandler, RuntimeServicesAware
By default this event handler renders the exception name only.
To include both the exception name and the message, set the property
eventhandler.methodexception.message to true. To render
the stack trace, set the property eventhandler.methodexception.stacktrace
to true.
MethodExceptionEventHandler.MethodExceptionExecutor| 构造器和说明 |
|---|
PrintExceptions() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Object |
methodException(java.lang.Class claz,
java.lang.String method,
java.lang.Exception e)
Render the method exception, and optionally the exception message and stack trace.
|
void |
setRuntimeServices(RuntimeServices rs)
Called automatically when event cartridge is initialized.
|
public java.lang.Object methodException(java.lang.Class claz,
java.lang.String method,
java.lang.Exception e)
throws java.lang.Exception
methodException 在接口中 MethodExceptionEventHandlerclaz - the class of the object the method is being applied tomethod - the methode - the thrown exceptionjava.lang.Exception - an exception to be thrown instead inserting an objectpublic void setRuntimeServices(RuntimeServices rs)
RuntimeServicesAwaresetRuntimeServices 在接口中 RuntimeServicesAwarers - RuntimeServices object assigned during initializationRuntimeServicesAware.setRuntimeServices(bboss.org.apache.velocity.runtime.RuntimeServices)