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 * 028 * @param message the detail message. 029 */ 030 public ExceptionCheckError(String message) 031 { super(message); } 032 033 /** 034 * Constructs a new error with the specified detail {@code 'message'} and 035 * {@code 'cause'}. 036 * 037 * <BR /><BR /><B>NOTE:</B> The detail message associated with {@code 'cause'} is not 038 * automatically incorporated in this error's detail message. 039 * 040 * @param message The detail message (which is saved for later retrieval by th 041 * {@code Throwable.getMessage()} method). 042 * 043 * @param cause the cause (which is saved for later retrieval by the 044 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 045 * cause is nonexistent or unknown.) 046 */ 047 public ExceptionCheckError(String message, Throwable cause) 048 { super(message); initCause(cause); } 049 050 /** 051 * Constructs a new error with the specified {@code 'cause'} and a detail message of 052 * {@code (cause==null ? null : cause.toString())} (which typically contains the class 053 * and detail message of cause). This constructor is useful for errors that are little 054 * more than wrappers for other throwables. 055 * 056 * @param cause The cause (which is saved for later retrieval by the 057 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 058 * cause is nonexistent or unknown.) 059 */ 060 public ExceptionCheckError(Throwable cause) 061 { super(); initCause(cause); } 062}