001package Torello.Java; 002 003/** 004 * Used when a parameter accepts an intance of {@code 'Object'}, but stipulates that this reference 005 * must be a reference to a primitive-array. If an instance of a non-primitive-array is passed, 006 * it may be the case that the code causing the exception should re-evaluate the use of whatever 007 * method generated that error. 008 * 009 * <BR /><BR />This class inherit {@code 'Error'}, rather than {@code 'Exception'} because likely 010 * the programmer really has typed something incorrect into his / her code. In this JAR library, 011 * this error is thrown <I>from within an exception-check method 012 * {@link ParallelArrayException#check(Object, String, Object, String)}</I>. Exception check's 013 * that generate other exception's necessitate inheriting {@code 'Error'}. 014 */ 015public class ArrayExpectedError extends ExceptionCheckError 016{ 017 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ 018 public static final long serialVersionUID = 1; 019 020 /** Constructs an {@code 'ArrayExpectedError'} with no detail message. */ 021 public ArrayExpectedError() 022 { super(); } 023 024 /** 025 * Constructs an {@code 'ArrayExpectedError'} with the specified detail message. 026 * 027 * @param message the detail message. 028 */ 029 public ArrayExpectedError(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 ArrayExpectedError(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 ArrayExpectedError(Throwable cause) 062 { super(); initCause(cause); } 063}