1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package Torello.HTML;

/**
 * This Exception may be thrown by code that checks the validity of an HTML Page
 * <CODE>Vector</CODE>.
 *
 * <BR /><BR /><B><I><SPAN STYLE="color: red;">This scrape package loads HTML pages into page
 * {@code Vector's}, and does not check <B>DOM-Tree</B> styled validity warnings.</SPAN></I></B>
 *
 * <BR /><BR />This is a "vectorized" approach to HTML.  The good part of loading pages to
 * {@code Vector's} is that HTML-trees are really notoriously bad for analysing anything about the
 * content of the page - other than for looking up answers, numbers, or a catch-phrase here or
 * there.  This package was developed to translate foreign-news articles, but could easily be used
 * for parsing or reading any HTML-page on the internet.  As such, no HTML-trees are built, and
 * therefore validity checking is not performed by this package.  This does mean articles are never
 * transformed, nor changed, all the parser does is load tokens to an array-like {@code Vector}.
 *
 * <BR /><BR />Loading content to a tree, and checking for validity, and performing suggestions and
 * modifications might come from a later package-development, but for the time being, this type of
 * analysis would only make the project much more difficult to read, and not provide a lot of
 * benefit in the realm of web-sites who don't have "poorly formed HTML" content problems.
 *
 * <BR /><BR /><B>NOTE:</B> I have left this class here because it is used once or twice by class
 * "Elements", and because perhaps a programmer might wish to do validity checking.
 */
public class MalformedHTMLException extends Exception
{
    /** <EMBED CLASS="external-html" DATA-FILE-ID="SVUIDEX"> */
    public static final long serialVersionUID = 1;

    /** Constructs a {@code MalformedHTMLException} with no detail message. */
    public MalformedHTMLException()
    { super(); }

    /**
     * Constructs a {@code MalformedHTMLException} with the specified detail message.
     * @param message the detail message.
     */
    public MalformedHTMLException(String message)
    { super(message); }

    /**
     * Constructs a new exception with the specified detail message and cause.
     * <BR /><BR /><B>NOTE:</B> The detail message associated with cause is not automatically
     * incorporated in this exception's detail message.
     * @param message The detail message (which is saved for later retrieval by the
     * {@code Throwable.getMessage()} method).
     * @param cause the cause (which is saved for later retrieval by the {@code Throwable.getCause()}
     * method).  (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
     */
    public MalformedHTMLException(String message, Throwable cause)
    { super(message, cause); }

    /**
     * Constructs a new exception with the specified cause and a detail message of
     * {@code (cause==null ? null : cause.toString())} (which typically contains the class and detail
     * message of cause).
     * This constructor is useful for exceptions that are little more than wrappers for other throwables.
     * @param cause The cause (which is saved for later retrieval by the {@code Throwable.getCause()}
     * method).  (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
     */
    public MalformedHTMLException(Throwable cause)
    { super(cause); }
}