001package Torello.HTML;
002
003/**
004 * This can be used to catch different types of exceptions using the same code-branch, since
005 * it is the parent-class of several 'Node Expected Exceptions'.
006 * 
007 * <BR /><BR />A "node expected" exception means that an HTML-Page {@code Vector} contained a
008 * {@code TextNode} where it expected to find {@code TagNode}, for instance.  It may also be used
009 * to indicate that an "Opening Tag" was found when a "Closing Tag" was expected (or vice-versa!)
010 */
011public abstract class NodeExpectedException extends RuntimeException
012{
013    /** <EMBED CLASS="external-html" DATA-FILE-ID="SVUIDEX"> */
014    public static final long serialVersionUID = 1;
015
016    /** Constructs a {@code NodeExpectedException} with no detail message. */
017    public NodeExpectedException()
018    { super(); }
019
020    /**
021     * Constructs a {@code NodeExpectedException} with the specified detail message.
022     * @param message the detail message.
023     */
024    public NodeExpectedException(String message)
025    { super(message); }
026
027    /**
028     * Constructs a new exception with the specified detail message and cause.
029     * <BR /><BR /><B>NOTE:</B> The detail message associated with cause is not automatically
030     * incorporated in this exception's detail message.
031     * @param message The detail message (which is saved for later retrieval by the
032     * {@code Throwable.getMessage()} method).
033     * @param cause the cause (which is saved for later retrieval by the {@code Throwable.getCause()}
034     * method).  (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
035     */
036    public NodeExpectedException(String message, Throwable cause)
037    { super(message, cause); }
038
039    /**
040     * Constructs a new exception with the specified cause and a detail message of
041     * {@code (cause==null ? null : cause.toString())} (which typically contains the class and detail
042     * message of cause).
043     * This constructor is useful for exceptions that are little more than wrappers for other throwables.
044     * @param cause The cause (which is saved for later retrieval by the {@code Throwable.getCause()}
045     * method).  (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
046     */
047    public NodeExpectedException(Throwable cause)
048    { super(cause); }
049}