| java.lang.Object java.lang.Throwable java.lang.Exception org.logicalcobwebs.proxool.ProxoolException
ProxoolException | public class ProxoolException extends Exception (Code) | | Proxool exception class that emulates the behaviour of the new cause
facility in jdk 1.4. It is also known as the chained
exception facility, as the cause can, itself, have a cause, and so on,
leading to a "chain" of exceptions, each caused by another.
A cause can be associated with a throwable in two ways: via a
constructor that takes the cause as an argument, or via the
ProxoolException.initCause(Throwable) method. New throwable classes that
wish to allow causes to be associated with them should provide constructors
that take a cause and delegate (perhaps indirectly) to one of the
Throwable constructors that takes a cause.
version: $Revision: 1.2 $, $Date: 2003/03/03 11:11:58 $ author: Christian Nedregaard (christian_nedregaard@email.com) author: $Author: billhorsman $ (current maintainer) since: Proxool 0.6 |
Constructor Summary | |
public | ProxoolException() Constructs a new instance with null as its detail message. | public | ProxoolException(String message) Constructs a new instance with the specified detail message. | public | ProxoolException(String message, Throwable cause) Constructs a new instance with the specified detail message and cause.
Note that the detail message associated with
cause is not automatically incorporated in
this throwable's detail message.
Parameters: message - the detail message (which is saved for later retrievalby the ProxoolException.getMessage() method). Parameters: cause - the cause (which is saved for later retrieval by theProxoolException.getCause() method). | public | ProxoolException(Throwable cause) Constructs a new throwable with the specified cause and a detail
message of (cause==null ? null : cause.toString()) (which
typically contains the class and detail message of cause).
This constructor is useful for throwables that are little more than
wrappers for other throwables.
Parameters: cause - the cause (which is saved for later retrieval by theProxoolException.getCause() method). |
Method Summary | |
public Throwable | getCause() Returns the cause of this exception or null if the
cause is nonexistent or unknown. | public synchronized Throwable | initCause(Throwable cause) Initializes the cause of this exception to the specified value.
(The cause is the throwable that caused this exception to get thrown.)
This method can be called at most once. | public void | printStackTrace() Prints this ProxoolException and its backtrace to the
standard error stream. | public void | printStackTrace(PrintStream stream) Prints this ProxoolException and its backtrace to the specified print stream. | public void | printStackTrace(PrintWriter writer) Prints this ProxoolException and its backtrace to the specified
print writer. |
ProxoolException | public ProxoolException()(Code) | | Constructs a new instance with null as its detail message.
The cause is not initialized, and may subsequently be initialized by a
call to
ProxoolException.initCause .
|
ProxoolException | public ProxoolException(String message)(Code) | | Constructs a new instance with the specified detail message. The
cause is not initialized, and may subsequently be initialized by
a call to
ProxoolException.initCause .
Parameters: message - the detail message. The detail message is saved forlater retrieval by the ProxoolException.getMessage() method. |
ProxoolException | public ProxoolException(String message, Throwable cause)(Code) | | Constructs a new instance with the specified detail message and cause.
Note that the detail message associated with
cause is not automatically incorporated in
this throwable's detail message.
Parameters: message - the detail message (which is saved for later retrievalby the ProxoolException.getMessage() method). Parameters: cause - the cause (which is saved for later retrieval by theProxoolException.getCause() method). (A null value ispermitted, and indicates that the cause is nonexistent orunknown.) |
ProxoolException | public ProxoolException(Throwable cause)(Code) | | Constructs a new throwable with the specified cause and a detail
message of (cause==null ? null : cause.toString()) (which
typically contains the class and detail message of cause).
This constructor is useful for throwables that are little more than
wrappers for other throwables.
Parameters: cause - the cause (which is saved for later retrieval by theProxoolException.getCause() method). (A null value ispermitted, and indicates that the cause is nonexistent orunknown.) |
getCause | public Throwable getCause()(Code) | | Returns the cause of this exception or null if the
cause is nonexistent or unknown. (The cause is the throwable that
caused this exception to get thrown.)
This implementation returns the cause that was supplied via one of
the constructors requiring a Throwable, or that was set after
creation with the
ProxoolException.initCause(Throwable) method.
the cause of this throwable or null if thecause is nonexistent or unknown. |
initCause | public synchronized Throwable initCause(Throwable cause)(Code) | | Initializes the cause of this exception to the specified value.
(The cause is the throwable that caused this exception to get thrown.)
This method can be called at most once. It is generally called from
within the constructor, or immediately after creating the
throwable. If this throwable was created
with
ProxoolException.ProxoolException(Throwable) or
ProxoolException.ProxoolException(String,Throwable) , this method cannot be called
even once.
Parameters: cause - the cause (which is saved for later retrieval by theProxoolException.getCause() method). (A null value ispermitted, and indicates that the cause is nonexistent orunknown.) a reference to this ProxoolException instance. |
printStackTrace | public void printStackTrace()(Code) | | Prints this ProxoolException and its backtrace to the
standard error stream.
The backtrace for a ProxoolException with an initialized, non-null cause
should generally include the backtrace for the cause.
|
printStackTrace | public void printStackTrace(PrintStream stream)(Code) | | Prints this ProxoolException and its backtrace to the specified print stream.
Parameters: stream - PrintStream to use for output |
printStackTrace | public void printStackTrace(PrintWriter writer)(Code) | | Prints this ProxoolException and its backtrace to the specified
print writer.
Parameters: writer - PrintWriter to use for output |
|
|