1 package org.apache.turbine.modules.actions;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import org.apache.turbine.pipeline.PipelineData;
24 import org.apache.turbine.util.RunData;
25 import org.apache.velocity.context.Context;
26 import org.apache.commons.logging.Log;
27 import org.apache.commons.logging.LogFactory;
28
29
30
31
32
33
34
35
36 public class VelocityActionThrowsException extends VelocityAction
37 {
38 private static Log log = LogFactory.getLog(VelocityActionThrowsException.class);
39
40
41
42
43
44
45
46 public void doPerform(RunData data, Context context) throws Exception
47 {
48 log.debug("Calling doPerform(RunData)");
49 throw new Exception("From VelocityActionThrowsException.doPerform an Exception is always thrown!");
50 }
51
52
53
54
55
56
57
58
59 public void doPerform(PipelineData data, Context context) throws Exception
60 {
61 log.debug("Calling doPerform(PipelineData)");
62 throw new Exception("From VelocityActionThrowsException.doPerform an Exception is always thrown!");
63 }
64
65
66
67
68
69
70
71
72
73 public void doCauseexception(RunData data, Context context) throws Exception
74 {
75 log.debug("Calling doCauseexception(RunData)");
76 throw new Exception("From Action Event VelocityActionThrowsException.doCauseexception an Exception is always thrown!");
77 }
78
79
80
81
82
83
84
85 public void doCauseexception(PipelineData data, Context context) throws Exception
86 {
87 log.debug("Calling doCauseexception(PipelineData)");
88 throw new Exception("From Action Event VelocityActionThrowsException.doCauseexception an Exception is always thrown!");
89 }
90
91
92 }