01: /*
02: * Copyright 2004-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.springframework.webflow.engine;
17:
18: import org.springframework.webflow.core.collection.AttributeMap;
19: import org.springframework.webflow.execution.Action;
20: import org.springframework.webflow.execution.FlowExecutionException;
21:
22: /**
23: * Thrown if an unhandled exception occurs when an action is executed. Typically
24: * wraps another exception noting the root cause failure. The root cause may be
25: * checked or unchecked.
26: *
27: * @see org.springframework.webflow.execution.Action
28: * @see org.springframework.webflow.engine.ActionState
29: *
30: * @author Keith Donald
31: * @author Erwin Vervaet
32: */
33: public class ActionExecutionException extends FlowExecutionException {
34:
35: /**
36: * Create a new action execution exception.
37: * @param flowId the current flow
38: * @param stateId the current state (may be null)
39: * @param action the action that generated an unrecoverable exception
40: * @param executionAttributes action execution properties that may have contributed to this failure
41: * @param cause the underlying cause
42: */
43: public ActionExecutionException(String flowId, String stateId,
44: Action action, AttributeMap executionAttributes,
45: Throwable cause) {
46: super (flowId, stateId, "Exception thrown executing " + action
47: + " in state '" + stateId + "' of flow '" + flowId
48: + "' -- action execution attributes were '"
49: + executionAttributes + "'", cause);
50: }
51:
52: /**
53: * Create a new action execution exception.
54: * @param flowId the current flow
55: * @param stateId the current state (may be null)
56: * @param action the action that generated an unrecoverable exception
57: * @param executionAttributes action execution properties that may have contributed to this failure
58: * @param message a descriptive message
59: * @param cause the underlying cause
60: */
61: public ActionExecutionException(String flowId, String stateId,
62: Action action, AttributeMap executionAttributes,
63: String message, Throwable cause) {
64: super(flowId, stateId, message, cause);
65: }
66:
67: }
|