01: /*
02: * Copyright 2004 The Apache Software Foundation
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:
17: package org.jbpm.jpdl.el;
18:
19: import org.jbpm.JbpmException;
20:
21: /**
22: * Represents any of the exception conditions that arise during the
23: * operation evaluation of the evaluator.
24: *
25: * @since 2.0
26: */
27: public class ELException extends JbpmException {
28: private static final long serialVersionUID = 1L;
29:
30: //-------------------------------------
31: // Member variables
32: //-------------------------------------
33:
34: private Throwable mRootCause;
35:
36: //-------------------------------------
37: /**
38: * Creates an ELException with no detail message.
39: **/
40: public ELException() {
41: super ();
42: }
43:
44: //-------------------------------------
45: /**
46: * Creates an ELException with the provided detail message.
47: *
48: * @param pMessage the detail message
49: **/
50: public ELException(String pMessage) {
51: super (pMessage);
52: }
53:
54: //-------------------------------------
55: /**
56: * Creates an ELException with the given root cause.
57: *
58: * @param pRootCause the originating cause of this exception
59: **/
60: public ELException(Throwable pRootCause) {
61: super (pRootCause.getLocalizedMessage());
62: mRootCause = pRootCause;
63: }
64:
65: //-------------------------------------
66: /**
67: * Creates an ELException with the given detail message and root cause.
68: *
69: * @param pMessage the detail message
70: * @param pRootCause the originating cause of this exception
71: **/
72: public ELException(String pMessage, Throwable pRootCause) {
73: super (pMessage);
74: mRootCause = pRootCause;
75: }
76:
77: //-------------------------------------
78: /**
79: * Returns the root cause.
80: *
81: * @return the root cause of this exception
82: */
83: public Throwable getRootCause() {
84: return mRootCause;
85: }
86: }
|