org.apache.velocity.test.misc
Class ExceptionGeneratingEventHandler

java.lang.Object
  extended by org.apache.velocity.test.misc.ExceptionGeneratingEventHandler
All Implemented Interfaces:
org.apache.velocity.app.event.EventHandler, org.apache.velocity.app.event.IncludeEventHandler, org.apache.velocity.app.event.MethodExceptionEventHandler, org.apache.velocity.app.event.NullSetEventHandler, org.apache.velocity.app.event.ReferenceInsertionEventHandler

public class ExceptionGeneratingEventHandler
extends Object
implements org.apache.velocity.app.event.IncludeEventHandler, org.apache.velocity.app.event.MethodExceptionEventHandler, org.apache.velocity.app.event.NullSetEventHandler, org.apache.velocity.app.event.ReferenceInsertionEventHandler

Event handlers that always throws an exception. Used to test that RuntimeExceptions are passed through.

Version:
$Id: ExceptionGeneratingEventHandler.java 463298 2006-10-12 16:10:32Z henning $
Author:
Will Glass-Husain

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.IncludeEventHandler
org.apache.velocity.app.event.IncludeEventHandler.IncludeEventExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.MethodExceptionEventHandler
org.apache.velocity.app.event.MethodExceptionEventHandler.MethodExceptionExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.NullSetEventHandler
org.apache.velocity.app.event.NullSetEventHandler.ShouldLogOnNullSetExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.ReferenceInsertionEventHandler
org.apache.velocity.app.event.ReferenceInsertionEventHandler.referenceInsertExecutor
 
Constructor Summary
ExceptionGeneratingEventHandler()
           
 
Method Summary
 String includeEvent(String includeResourcePath, String currentResourcePath, String directiveName)
           
 Object methodException(Class claz, String method, Exception e)
           
 Object referenceInsert(String reference, Object value)
           
 boolean shouldLogOnNullSet(String lhs, String rhs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionGeneratingEventHandler

public ExceptionGeneratingEventHandler()
Method Detail

includeEvent

public String includeEvent(String includeResourcePath,
                           String currentResourcePath,
                           String directiveName)
Specified by:
includeEvent in interface org.apache.velocity.app.event.IncludeEventHandler

methodException

public Object methodException(Class claz,
                              String method,
                              Exception e)
                       throws Exception
Specified by:
methodException in interface org.apache.velocity.app.event.MethodExceptionEventHandler
Throws:
Exception

shouldLogOnNullSet

public boolean shouldLogOnNullSet(String lhs,
                                  String rhs)
Specified by:
shouldLogOnNullSet in interface org.apache.velocity.app.event.NullSetEventHandler

referenceInsert

public Object referenceInsert(String reference,
                              Object value)
Specified by:
referenceInsert in interface org.apache.velocity.app.event.ReferenceInsertionEventHandler


Copyright © 2000-2010 The Apache Software Foundation. All Rights Reserved.