001package Torello.Java; 002 003/** 004 * 💡 This exception is intended to run in the except same vein as Java's traditional 005 * {@code IllegalArgumentException}. The exception for "Illegal Arguments" is a long-standing 006 * staple in Java-HTML, and is used simply to imply that an incorrect value was passed to one of 007 * the input parameters to a method or constructor. 008 * 009 * <BR /><BR /> 010 * 📌 This exception is used best when there are a list of method overloads in a given class, and 011 * the programmer has attempted to invoke one which doesn't apply to the particular scenario or 012 * situation at hand. For example, calling a method such as {@code 'accept(int i)'} when the class 013 * involved was expecting {@code 'accept(String s)'}. Other scenarios could conceivably involve 014 * an incorrectly timed action, that wasn't properly coordinated the given exact state of a class 015 * or instance. 016 * 017 * <BR /><BR /> 018 * It's first use in Java-HTML was as the parent class to the Browser Automation Library's 019 * {@link Torello.Browser.TypeAssignmentException TypeAssignmentException} 020 * 021 * <BR /><BR /><DIV CLASS=JDHint> 022 * 📎 This class inherits {@code RuntimeException}, and is thus extremely versatile, without causing 023 * much "Programmer Grief" the way checked exceptions sometimes can. 024 * </DIV> 025 */ 026public class WrongMethodException extends RuntimeException 027{ 028 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ 029 public static final long serialVersionUID = 1; 030 031 /** Constructs a {@code WrongMethodException} with no detail message. */ 032 public WrongMethodException() 033 { super(); } 034 035 /** 036 * Constructs a {@code WrongMethodException} with the specified detail message. 037 * @param message the detail message. 038 */ 039 public WrongMethodException(String message) 040 { super(message); } 041 042 /** 043 * Constructs a new {@code WrongMethodException} with the specified detail message and cause. 044 * 045 * <BR /><BR /><DIV CLASS=JDHint> 046 * <B STYLE='color:red;'>Note:</B> The detail message associated with cause is not 047 * automatically incorporated into this exception's detail message. 048 * </DIV> 049 * 050 * @param message The detail message (which is saved for later retrieval by the 051 * {@code Throwable.getMessage()} method). 052 * 053 * @param cause the cause (which is saved for later retrieval by the 054 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 055 * cause is nonexistent or unknown.) 056 */ 057 public WrongMethodException(String message, Throwable cause) 058 { super(message, cause); } 059 060 /** 061 * Constructs a new {@code WrongMethodException} with the specified cause and a detail message of 062 * {@code (cause==null ? null : cause.toString())} (which typically contains the class and 063 * detail message of cause). This constructor is useful for exceptions that are little more 064 * than wrappers for other throwables. 065 * 066 * @param cause The cause (which is saved for later retrieval by the 067 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 068 * cause is nonexistent or unknown.) 069 */ 070 public WrongMethodException(Throwable cause) 071 { super(cause); } 072}