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
65
66
67
68
69
70
71
72
73
package Torello.Browser.JsonAST;

/**
 * This error is used in place of the common {@code 'UnreachableError'}.  The code in the AST
 * parsing routines can sometimes be suspiciously difficult to debug, when an error sets in.
 * The first use of this {@code Throwable} is going to be in preventing a certain aspect of 
 * the {@link PPR#CTAS()} and {@link PPR#CTAB()} fields from being improperly initialized.
 * 
 * <BR /><BR />
 * In that example &amp; usage, there is currently no way for the relevant fields, which are
 * the {@code 'ctas'} and {@code 'ctab'} fields, to be improperly initialized.  However, explaining
 * what could go wrong is somewhat difficult, and salient ennough to let go of the commonly used
 * {@code 'UnreachableError'}, and instead dedicate this specially tailored error message instead.
 * 
 * <BR /><BR />
 * This is literally because breaking code can sometimes be completely unnoticed and invisble.
 * Please review the class {@link PPR} to understand what can go wrong when initializing the 
 * {@code 'ctas'} and {@code 'ctab'} fields.
 * 
 * <BR /><BR /><DIV CLASS=JDHint>
 * Almost instantly, after using this error, I noticed other places where this throwable could
 * be used to signify other internal errors.  It is not just being used for the CTAS / CTAB issues.
 * </DIV>
 */
public class LinkingStateError extends Error
{
    
    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX>  */
    public static final long serialVersionUID = 1;

    /** Constructs an {@code 'LinkingStateError'} with no detail message. */
    public LinkingStateError()
    { super(); }

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

    /**
     * Constructs a new error with the specified detail {@code 'message'} and 
     * {@code 'cause'}.
     * 
     * <BR /><BR /><DIV CLASS=JDHint>
     * <B STYLE='color:red;'>Note:</B> The detail message associated with cause is not
     * automatically incorporated into this exception's detail message.
     * </DIV>
     * 
     * @param message The detail message (which is saved for later retrieval by th
     * {@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 LinkingStateError(String message, Throwable cause)
    { super(message); initCause(cause); }

    /**
     * Constructs a new error with the specified {@code '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 errors 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 LinkingStateError(Throwable cause)
    { super(); initCause(cause); }   
}