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     * 
030     * <BR /><BR /><B CLASS=JDDescLabel>NOTE:</B>
031     * 
032     * <BR /><BR />The detail message associated with cause is not automatically incorporated into
033     * this exception's detail message.
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 NodeExpectedException(String message, Throwable cause)
043    { super(message, cause); }
044
045    /**
046     * Constructs a new exception with the specified cause and a detail message of
047     * {@code (cause==null ? null : cause.toString())} (which typically contains the class and
048     * detail message of cause).
049     * 
050     * This constructor is useful for exceptions that are little more than wrappers for other
051     * throwables.
052     * 
053     * @param cause The cause (which is saved for later retrieval by the
054     * {@code Throwable.getCause()} method).  (A null value is permitted, and indicates that the
055     * cause is nonexistent or unknown.)
056     */
057    public NodeExpectedException(Throwable cause)
058    { super(cause); }
059}