001package Torello.Java;
002
003/**
004 * During Testing, any place where the nature of the test is to ensure that a piece of code is 
005 * properly throwing an exception may utilize this exception to indicate that an exception didn't
006 * throw as expected.
007 * 
008 * <BR /><BR />This exception is thrown within the Java-HTML Framework inside of the Build-Tool's
009 * Testing-Classes.
010 */
011public class ShouldHaveThrownException extends RuntimeException
012{
013    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX>  */
014    public static final long serialVersionUID = 1;
015
016    /** Constructs a {@code ShouldHaveThrownException} with no detail message. */
017    public ShouldHaveThrownException()
018    { super(); }
019
020    /**
021     * Constructs a {@code ShouldHaveThrownException} with the specified detail message.
022     * @param message the detail message.
023     */
024    public ShouldHaveThrownException(String message)
025    { super(message); }
026
027    /**
028     * Constructs a new {@code ShouldHaveThrownException} with the specified detail message and cause.
029     * 
030     * <BR /><BR /><DIV CLASS=JDHint>
031     * <B STYLE='color:red;'>Note:</B> The detail message associated with cause is not
032     * automatically incorporated into this exception's detail message.
033     * </DIV>
034     * 
035     * @param message The detail message (which is saved for later retrieval by the
036     * {@code Throwable.getMessage()} method).
037     * 
038     * @param cause the cause (which is saved for later retrieval by the
039     * {@code Throwable.getCause()} method).  (A null value is permitted, and indicates that the
040     * cause is nonexistent or unknown.)
041     */
042    public ShouldHaveThrownException(String message, Throwable cause)
043    { super(message, cause); }
044
045    /**
046     * Constructs a new {@code ShouldHaveThrownException} with the specified cause and a detail message
047     * of {@code (cause==null ? null : cause.toString())} (which typically contains the class and
048     * detail message of cause).  This constructor is useful for exceptions that are little more
049     * than wrappers for other throwables.
050     * 
051     * @param cause The cause (which is saved for later retrieval by the
052     * {@code Throwable.getCause()} method).  (A null value is permitted, and indicates that the
053     * cause is nonexistent or unknown.)
054     */
055    public ShouldHaveThrownException(Throwable cause)
056    { super(cause); }
057}