001package Torello.Java; 002 003/** 004 * This class inherits class {@code 'Error'} because it is intended to mean that a more serious 005 * problems has just occurred. Checking for exceptions is quite common in Java, so much so that 006 * automated exception check methods can be very useful - they provide consistenly worded messages 007 * that do not need to be repeated over and over in the code. 008 * 009 * <BR /><BR />WHEN WRITING AN EXCEPTION CHECK METHOD - IT BECOMES POSSIBLE FOR A SITUATION TO 010 * ARISE WHERE THE INPUTS TO THAT METHOD ARE, THEMSELVES, INCORRECTLY FORMED. This is not a common 011 * situation, but when writing a "Method for Checking Exception Cases", if a programmer has provided 012 * erroneous parameter values to that check, then throwing this error relays that <I>the exception 013 * check mechanism, itself, has bugs! (And hopefully, the appropriate amount of severity 014 * conveyed).</I> 015 */ 016public class ExceptionCheckError extends Error 017{ 018 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ 019 public static final long serialVersionUID = 1; 020 021 /** Constructs an {@code 'ExceptionCheckError'} with no detail message. */ 022 public ExceptionCheckError() 023 { super(); } 024 025 /** 026 * Constructs an {@code 'ExceptionCheckError'} with the specified detail message. 027 * @param message the detail message. 028 */ 029 public ExceptionCheckError(String message) 030 { super(message); } 031 032 /** 033 * Constructs a new error with the specified detail {@code 'message'} and 034 * {@code 'cause'}. 035 * 036 * <BR /><BR /><DIV CLASS=JDHint> 037 * <B STYLE='color:red;'>Note:</B> The detail message associated with cause is not 038 * automatically incorporated into this exception's detail message. 039 * </DIV> 040 * 041 * @param message The detail message (which is saved for later retrieval by th 042 * {@code Throwable.getMessage()} method). 043 * 044 * @param cause the cause (which is saved for later retrieval by the 045 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 046 * cause is nonexistent or unknown.) 047 */ 048 public ExceptionCheckError(String message, Throwable cause) 049 { super(message); initCause(cause); } 050 051 /** 052 * Constructs a new error with the specified {@code 'cause'} and a detail message of 053 * {@code (cause==null ? null : cause.toString())} (which typically contains the class 054 * and detail message of cause). This constructor is useful for errors that are little 055 * more than wrappers for other throwables. 056 * 057 * @param cause The cause (which is saved for later retrieval by the 058 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 059 * cause is nonexistent or unknown.) 060 */ 061 public ExceptionCheckError(Throwable cause) 062 { super(); initCause(cause); } 063}