01: /**
02: * EasyBeans
03: * Copyright (C) 2007 Bull S.A.S.
04: * Contact: easybeans@ow2.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: LifeCycleCallbackException.java 2154 2007-12-11 11:23:59Z loris $
23: * --------------------------------------------------------------------------
24: */package org.ow2.easybeans.api;
25:
26: /**
27: * Exception thrown if there is a failure in a callback.
28: * @author Loris Bouzonnet
29: */
30: public class LifeCycleCallbackException extends Exception {
31:
32: /**
33: * Id for serializable class.
34: */
35: private static final long serialVersionUID = 8600810863196100244L;
36:
37: /**
38: * Constructs a new exception with <code>null</code> as its detail message.
39: * The cause is not initialized, and may subsequently be initialized by a
40: * call to {@link #initCause}.
41: */
42: public LifeCycleCallbackException() {
43: super ();
44: }
45:
46: /**
47: * Constructs a new exception with the specified detail message. The
48: * cause is not initialized, and may subsequently be initialized by
49: * a call to {@link #initCause}.
50: *
51: * @param message the detail message. The detail message is saved for
52: * later retrieval by the {@link #getMessage()} method.
53: */
54: public LifeCycleCallbackException(final String message) {
55: super (message);
56: }
57:
58: /**
59: * Constructs a new exception with the specified detail message and
60: * cause. <p>Note that the detail message associated with
61: * <code>cause</code> is <i>not</i> automatically incorporated in
62: * this exception's detail message.
63: *
64: * @param message the detail message (which is saved for later retrieval
65: * by the {@link #getMessage()} method).
66: * @param cause the cause (which is saved for later retrieval by the
67: * {@link #getCause()} method). (A <tt>null</tt> value is
68: * permitted, and indicates that the cause is nonexistent or
69: * unknown.)
70: * @since 1.4
71: */
72: public LifeCycleCallbackException(final String message,
73: final Throwable cause) {
74: super (message, cause);
75: }
76:
77: /**
78: * Constructs a new exception with the specified cause and a detail
79: * message of <tt>(cause==null ? null : cause.toString())</tt> (which
80: * typically contains the class and detail message of <tt>cause</tt>).
81: * This constructor is useful for exceptions that are little more than
82: * wrappers for other throwables (for example, {@link
83: * java.security.PrivilegedActionException}).
84: *
85: * @param cause the cause (which is saved for later retrieval by the
86: * {@link #getCause()} method). (A <tt>null</tt> value is
87: * permitted, and indicates that the cause is nonexistent or
88: * unknown.)
89: * @since 1.4
90: */
91: public LifeCycleCallbackException(final Throwable cause) {
92: super(cause);
93: }
94:
95: }
|