001    package org.apache.ojb.broker;
002    
003    /* Copyright 2002-2005 The Apache Software Foundation
004     *
005     * Licensed under the Apache License, Version 2.0 (the "License");
006     * you may not use this file except in compliance with the License.
007     * You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    
018    /**
019     * Base class for exceptions happening during persistence broker operations.
020     *
021     * @author Thomas Mahler
022     * @version $Id: PersistenceBrokerException.java,v 1.1 2007-08-24 22:17:35 ewestfal Exp $
023     */
024    public class PersistenceBrokerException extends OJBRuntimeException
025    {
026        /**
027         * Creates a new exception instance.
028         */
029        public PersistenceBrokerException()
030        {
031            super();
032        }
033    
034        /**
035         * Creates a new exception instance.
036         * 
037         * @param msg The exception message
038         */
039        public PersistenceBrokerException(String msg)
040        {
041            super(msg);
042        }
043    
044        /**
045         * Creates a new exception instance.
046         * 
047         * @param cause The base exception
048         */
049        public PersistenceBrokerException(Throwable cause)
050        {
051            super(cause);
052        }
053    
054        /**
055         * Creates a new exception instance.
056         * 
057         * @param msg   The exception message
058         * @param cause The base exception
059         */
060        public PersistenceBrokerException(String msg, Throwable cause)
061        {
062            super(msg, cause);
063        }
064    
065        /**
066         * Gets the original exception if any.
067         * 
068         * @return The source exception
069         * @deprecated Use {@link #getCause()} instead
070         */
071        public Throwable getSourceException()
072        {
073            return getCause();
074        }
075    }