ProgramException.java

package edu.hawaii.ics.yucheng;

/**
 * An exception that is used as a wrapper for other exceptions throughout the
 * application.
 * 
 * @author Cheng Jade
 * @assignment ICS 421 Project
 * @date Feb 29, 2010
 * @bugs None
 */
public class ProgramException extends Exception {

    /** The serialized version id. */
    private static final long serialVersionUID = 1L;

    /**
     * Initializes a new instance of the ProgramException class.
     * 
     * @param msg
     *            The detail message (which is saved for later retrieval by the
     *            Throwable.getMessage() method).
     * 
     * @param cause
     *            The cause (which is saved for later retrieval by the
     *            Throwable.getCause() method). (A null value is permitted, and
     *            indicates that the cause is nonexistent or unknown.)
     */
    public ProgramException(final String msg, final Throwable cause) {
        super(msg, cause);
    }

    /**
     * Initializes a new instance of the ProgramException class.
     * 
     * @param msg
     *            The detail message. The detail message is saved for later
     *            retrieval by the Throwable.getMessage() method.
     */
    public ProgramException(final String msg) {
        super(msg);
    }

    /**
     * Initializes a new instance of the ProgramException class.
     * 
     * @param cause
     *            The cause (which is saved for later retrieval by the
     *            Throwable.getCause() method). (A null value is permitted, and
     *            indicates that the cause is nonexistent or unknown.)
     */
    public ProgramException(final Exception cause) {
        super(cause == null ? "Unknown cause" : cause.getMessage(), cause);
    }
}
Valid HTML 4.01 Valid CSS