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 *
023 * <BR /><BR /><B>NOTE:</B> I have left this class here because it is used once or twice by class
024 * "Elements", and because perhaps a programmer might wish to do validity checking.
025 */
026public class MalformedHTMLException extends Exception
027{
028    /** <EMBED CLASS="external-html" DATA-FILE-ID="SVUIDEX"> */
029    public static final long serialVersionUID = 1;
030
031    /** Constructs a {@code MalformedHTMLException} with no detail message. */
032    public MalformedHTMLException()
033    { super(); }
034
035    /**
036     * Constructs a {@code MalformedHTMLException} with the specified detail message.
037     * @param message the detail message.
038     */
039    public MalformedHTMLException(String message)
040    { super(message); }
041
042    /**
043     * Constructs a new exception with the specified detail message and cause.
044     * <BR /><BR /><B>NOTE:</B> The detail message associated with cause is not automatically
045     * incorporated in this exception's detail message.
046     * @param message The detail message (which is saved for later retrieval by the
047     * {@code Throwable.getMessage()} method).
048     * @param cause the cause (which is saved for later retrieval by the {@code Throwable.getCause()}
049     * method).  (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
050     */
051    public MalformedHTMLException(String message, Throwable cause)
052    { super(message, cause); }
053
054    /**
055     * Constructs a new exception with the specified cause and a detail message of
056     * {@code (cause==null ? null : cause.toString())} (which typically contains the class and detail
057     * message of cause).
058     * This constructor is useful for exceptions that are little more than wrappers for other throwables.
059     * @param cause The cause (which is saved for later retrieval by the {@code Throwable.getCause()}
060     * method).  (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
061     */
062    public MalformedHTMLException(Throwable cause)
063    { super(cause); }
064}