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
package Torello.Java;

/**
 * This class inherits class {@code 'Error'} because it is intended to mean that a more serious
 * problems has just occurred.  Checking for exceptions is quite common in Java, so much so that
 * automated exception check methods can be very useful - they provide consistenly worded messages
 * that do not need to be repeated over and over in the code.
 * 
 * <BR /><BR />WHEN WRITING AN EXCEPTION CHECK METHOD - IT BECOMES POSSIBLE FOR A SITUATION TO 
 * ARISE WHERE THE INPUTS TO THAT METHOD ARE, THEMSELVES, INCORRECTLY FORMED.  This is not a common
 * situation, but when writing a "Method for Checking Exception Cases", if a programmer has provided
 * erroneous parameter values to that check, then throwing this error relays that <I>the exception
 * check mechanism, itself, has bugs!  (And hopefully, the appropriate amount of severity
 * conveyed).</I>
 */
public class ExceptionCheckError extends Error
{
    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX>  */
    public static final long serialVersionUID = 1;

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

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

    /**
     * Constructs a new error with the specified detail {@code 'message'} and 
     * {@code 'cause'}.
     * 
     * <BR /><BR /><B>NOTE:</B> The detail message associated with {@code 'cause'} is not
     * automatically incorporated in this error's detail message.
     * 
     * @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 ExceptionCheckError(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 ExceptionCheckError(Throwable cause)
    { super(); initCause(cause); }
}