001package Torello.Java.Additional;
002
003/**
004 * A general purpose exception used to indicate there have been problems with an asynchronous
005 * communications system or channel.  Currently, this is thrown by the class {@link Promise} to
006 * wrap an unchecked {@code java.lang.InterruptedException}, and for other user initiated errors.
007 */
008public class AsynchronousException extends RuntimeException
009{
010    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX>  */
011    public static final long serialVersionUID = 1;
012
013    /** Constructs a {@code AsynchronousException} with no detail message. */
014    public AsynchronousException()
015    { super(); }
016
017    /**
018     * Constructs a {@code AsynchronousException} with the specified detail message.
019     * @param message the detail message.
020     */
021    public AsynchronousException(String message)
022    { super(message); }
023
024    /**
025     * Constructs a new {@code AsynchronousException} with the specified detail message and cause.
026     *
027     * <BR /><BR /><B CLASS=JDDescLabel>NOTE:</B>
028     * 
029     * <BR /><BR />The detail message associated with cause is not automatically incorporated into
030     * this exception's detail message.
031     * 
032     * @param message The detail message (which is saved for later retrieval by the
033     * {@code Throwable.getMessage()} method).
034     * 
035     * @param cause the cause (which is saved for later retrieval by the
036     * {@code Throwable.getCause()} method).  (A null value is permitted, and indicates that the
037     * cause is nonexistent or unknown).
038     */
039    public AsynchronousException(String message, Throwable cause)
040    { super(message, cause); }
041
042    /**
043     * Constructs a new {@code AsynchronousException} with the specified cause and a detail message
044     * of {@code (cause==null ? null : cause.toString())} (which typically contains the class and
045     * detail message of cause).
046     * 
047     * <BR /><BR />This constructor is useful for exceptions that are little more than wrappers for
048     * other throwables.
049     * 
050     * @param cause The cause (which is saved for later retrieval by the
051     * {@code Throwable.getCause()} method).  (A null value is permitted, and indicates that the
052     * cause is nonexistent or unknown).
053     */
054    public AsynchronousException(Throwable cause)
055    { super(cause); }
056}