01: package org.apache.ojb.broker;
02:
03: /* Copyright 2002-2005 The Apache Software Foundation
04: *
05: * Licensed under the Apache License, Version 2.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /**
19: * Base class for exceptions happening during persistence broker operations.
20: *
21: * @author Thomas Mahler
22: * @version $Id: PersistenceBrokerException.java,v 1.9.2.2 2005/12/22 21:15:14 tomdz Exp $
23: */
24: public class PersistenceBrokerException extends OJBRuntimeException {
25: /**
26: * Creates a new exception instance.
27: */
28: public PersistenceBrokerException() {
29: super ();
30: }
31:
32: /**
33: * Creates a new exception instance.
34: *
35: * @param msg The exception message
36: */
37: public PersistenceBrokerException(String msg) {
38: super (msg);
39: }
40:
41: /**
42: * Creates a new exception instance.
43: *
44: * @param cause The base exception
45: */
46: public PersistenceBrokerException(Throwable cause) {
47: super (cause);
48: }
49:
50: /**
51: * Creates a new exception instance.
52: *
53: * @param msg The exception message
54: * @param cause The base exception
55: */
56: public PersistenceBrokerException(String msg, Throwable cause) {
57: super (msg, cause);
58: }
59:
60: /**
61: * Gets the original exception if any.
62: *
63: * @return The source exception
64: * @deprecated Use {@link #getCause()} instead
65: */
66: public Throwable getSourceException() {
67: return getCause();
68: }
69: }
|