Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
WorkflowException |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 1999-2001,2004 The Apache Software Foundation. | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
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 | ||
17 | package org.apache.commons.workflow; | |
18 | ||
19 | ||
20 | /** | |
21 | * <p>A <strong>WorkflowException</strong> is the base class for exceptions | |
22 | * related to the workflow engine framework.</p> | |
23 | * | |
24 | * @version $Revision: 155475 $ $Date: 2005-02-26 13:31:11 +0000 (Sat, 26 Feb 2005) $ | |
25 | * @author Craig R. McClanahan | |
26 | */ | |
27 | ||
28 | public class WorkflowException extends Exception { | |
29 | ||
30 | ||
31 | // ----------------------------------------------------------- Constructors | |
32 | ||
33 | ||
34 | /** | |
35 | * Construct an empty WorkflowException. | |
36 | */ | |
37 | public WorkflowException() { | |
38 | ||
39 | 0 | super(); |
40 | ||
41 | 0 | } |
42 | ||
43 | ||
44 | /** | |
45 | * Construct a WorkflowException with the specified message. | |
46 | * | |
47 | * @param message Message associated with this exception | |
48 | */ | |
49 | public WorkflowException(String message) { | |
50 | ||
51 | 0 | super(message); |
52 | ||
53 | 0 | } |
54 | ||
55 | ||
56 | /** | |
57 | * Construct a WorkflowException with the specified underlying cause. | |
58 | * [JDK 1.4 compatible] | |
59 | * | |
60 | * @param cause Underlying root cause | |
61 | */ | |
62 | public WorkflowException(Throwable cause) { | |
63 | ||
64 | 0 | super(); |
65 | 0 | this.cause = cause; |
66 | ||
67 | 0 | } |
68 | ||
69 | ||
70 | /** | |
71 | * Construct a WorkflowException with the specified message and | |
72 | * underlying cause. [JDK 1.4 compatbile] | |
73 | * | |
74 | * @param message Message associated with this exception | |
75 | * @param cause Underlying root cause | |
76 | */ | |
77 | public WorkflowException(String message, Throwable cause) { | |
78 | ||
79 | 0 | super(message); |
80 | 0 | this.cause = cause; |
81 | ||
82 | 0 | } |
83 | ||
84 | ||
85 | // ------------------------------------------------------------- Properties | |
86 | ||
87 | ||
88 | /** | |
89 | * The underlying cause exception (if any). | |
90 | */ | |
91 | 0 | protected Throwable cause = null; |
92 | ||
93 | public Throwable getCause() { | |
94 | 0 | return (this.cause); |
95 | } | |
96 | ||
97 | ||
98 | } | |
99 | ||
100 | ||
101 |