1 package org.apache.velocity.test.misc;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.velocity.app.event.IncludeEventHandler;
23 import org.apache.velocity.app.event.MethodExceptionEventHandler;
24 import org.apache.velocity.app.event.NullSetEventHandler;
25 import org.apache.velocity.app.event.ReferenceInsertionEventHandler;
26
27
28
29
30
31
32
33
34 public class ExceptionGeneratingEventHandler implements IncludeEventHandler,
35 MethodExceptionEventHandler, NullSetEventHandler, ReferenceInsertionEventHandler
36 {
37
38 public String includeEvent(String includeResourcePath, String currentResourcePath,
39 String directiveName)
40 {
41 throw new RuntimeException("exception");
42 }
43
44 public Object methodException(Class claz, String method, Exception e) throws Exception
45 {
46 throw new RuntimeException("exception");
47 }
48
49 public boolean shouldLogOnNullSet(String lhs, String rhs)
50 {
51 throw new RuntimeException("exception");
52 }
53
54 public Object referenceInsert(String reference, Object value)
55 {
56 throw new RuntimeException("exception");
57 }
58
59 }