001    /*
002     * Copyright 1999-2001,2004 The Apache Software Foundation.
003     * 
004     * Licensed under the Apache License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     *      http://www.apache.org/licenses/LICENSE-2.0
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */ 
016    
017    package org.apache.commons.workflow;
018    
019    
020    /**
021     * <p>A <strong>WorkflowException</strong> is the base class for exceptions
022     * related to the workflow engine framework.</p>
023     *
024     * @version $Revision: 155475 $ $Date: 2005-02-26 13:31:11 +0000 (Sat, 26 Feb 2005) $
025     * @author Craig R. McClanahan
026     */
027    
028    public class WorkflowException extends Exception {
029    
030    
031        // ----------------------------------------------------------- Constructors
032    
033    
034        /**
035         * Construct an empty WorkflowException.
036         */
037        public WorkflowException() {
038    
039            super();
040    
041        }
042    
043    
044        /**
045         * Construct a WorkflowException with the specified message.
046         *
047         * @param message Message associated with this exception
048         */
049        public WorkflowException(String message) {
050    
051            super(message);
052    
053        }
054    
055    
056        /**
057         * Construct a WorkflowException with the specified underlying cause.
058         * [JDK 1.4 compatible]
059         *
060         * @param cause Underlying root cause
061         */
062        public WorkflowException(Throwable cause) {
063    
064            super();
065            this.cause = cause;
066    
067        }
068    
069    
070        /**
071         * Construct a WorkflowException with the specified message and
072         * underlying cause.  [JDK 1.4 compatbile]
073         *
074         * @param message Message associated with this exception
075         * @param cause Underlying root cause
076         */
077        public WorkflowException(String message, Throwable cause) {
078    
079            super(message);
080            this.cause = cause;
081    
082        }
083    
084    
085        // ------------------------------------------------------------- Properties
086    
087    
088        /**
089         * The underlying cause exception (if any).
090         */
091        protected Throwable cause = null;
092    
093        public Throwable getCause() {
094            return (this.cause);
095        }
096    
097    
098    }
099    
100    
101