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

/**
 * 💡 This exception is intended to run in the except same vein as Java's traditional 
 * {@code IllegalArgumentException}.  The exception for "Illegal Arguments" is a long-standing
 * staple in Java-HTML, and is used simply to imply that an incorrect value was passed to one of 
 * the input parameters to a method or constructor.
 * 
 * <BR /><BR />
 * 📌 This exception is used best when there are a list of method overloads in a given class, and 
 * the programmer has attempted to invoke one which doesn't apply to the particular scenario or 
 * situation at hand.  For example, calling a method such as {@code 'accept(int i)'} when the class 
 * involved was expecting {@code 'accept(String s)'}.  Other scenarios could conceivably involve 
 * an incorrectly timed action, that wasn't properly coordinated the given exact state of a class 
 * or instance.
 * 
 * <BR /><BR />
 * It's first use in Java-HTML was as the parent class to the Browser Automation Library's
 * {@link Torello.Browser.TypeAssignmentException TypeAssignmentException}
 * 
 * <BR /><BR /><DIV CLASS=JDHint>
 * 📎 This class inherits {@code RuntimeException}, and is thus extremely versatile, without causing
 * much "Programmer Grief" the way checked exceptions sometimes can.
 * </DIV>
 */
public class WrongMethodException extends RuntimeException
{
    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX>  */
    public static final long serialVersionUID = 1;
    
    /** Constructs a {@code WrongMethodException} with no detail message. */
    public WrongMethodException()
    { super(); }

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

    /**
     * Constructs a new {@code WrongMethodException} with the specified detail message and 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 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 WrongMethodException(String message, Throwable cause)
    { super(message, cause); }

    /**
     * Constructs a new {@code WrongMethodException} 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 WrongMethodException(Throwable cause)
    { super(cause); }
}