001package Torello.HTML;
002
003/**
004 * This Exception may be thrown by code that checks the validity of an HTML Page
005 * <CODE>Vector</CODE>.
006 *
007 * <BR /><BR /><B><I><SPAN STYLE="color: red;">This scrape package loads HTML pages into page
008 * {@code Vector's}, and does not check <B>DOM-Tree</B> styled validity warnings.</SPAN></I></B>
009 *
010 * <BR /><BR />This is a "vectorized" approach to HTML.  The good part of loading pages to
011 * {@code Vector's} is that HTML-trees are really notoriously bad for analysing anything about the
012 * content of the page - other than for looking up answers, numbers, or a catch-phrase here or
013 * there.  This package was developed to translate foreign-news articles, but could easily be used
014 * for parsing or reading any HTML-page on the internet.  As such, no HTML-trees are built, and
015 * therefore validity checking is not performed by this package.  This does mean articles are never
016 * transformed, nor changed, all the parser does is load tokens to an array-like {@code Vector}.
017 *
018 * <BR /><BR />Loading content to a tree, and checking for validity, and performing suggestions and
019 * modifications might come from a later package-development, but for the time being, this type of
020 * analysis would only make the project much more difficult to read, and not provide a lot of
021 * benefit in the realm of web-sites who don't have "poorly formed HTML" content problems.
022 */
023public class MalformedHTMLException extends Exception
024{
025    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */
026    public static final long serialVersionUID = 1;
027
028    /** Constructs a {@code MalformedHTMLException} with no detail message. */
029    public MalformedHTMLException()
030    { super(); }
031
032    /**
033     * Constructs a {@code MalformedHTMLException} with the specified detail message.
034     * @param message the detail message.
035     */
036    public MalformedHTMLException(String message)
037    { super(message); }
038
039    /**
040     * Constructs a new exception with the specified detail message and cause.
041     * 
042     * <BR /><BR /><B CLASS=JDDescLabel>NOTE:</B>
043     * 
044     * <BR /><BR />The detail message associated with cause is not automatically incorporated into
045     * this exception's detail message.
046     * 
047     * @param message The detail message (which is saved for later retrieval by the
048     * {@code Throwable.getMessage()} method).
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 MalformedHTMLException(String message, Throwable cause)
055    { super(message, cause); }
056
057    /**
058     * Constructs a new exception with the specified cause and a detail message of
059     * {@code (cause==null ? null : cause.toString())} (which typically contains the class and
060     * detail message of cause).
061     * 
062     * This constructor is useful for exceptions that are little more than wrappers for other
063     * throwables.
064     * 
065     * @param cause The cause (which is saved for later retrieval by the
066     * {@code Throwable.getCause()} method).  (A null value is permitted, and indicates that the
067     * cause is nonexistent or unknown.)
068     */
069    public MalformedHTMLException(Throwable cause)
070    { super(cause); }
071}