jaroslav@49: /* jaroslav@49: * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved. jaroslav@49: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jaroslav@49: * jaroslav@49: * This code is free software; you can redistribute it and/or modify it jaroslav@49: * under the terms of the GNU General Public License version 2 only, as jaroslav@49: * published by the Free Software Foundation. Oracle designates this jaroslav@49: * particular file as subject to the "Classpath" exception as provided jaroslav@49: * by Oracle in the LICENSE file that accompanied this code. jaroslav@49: * jaroslav@49: * This code is distributed in the hope that it will be useful, but WITHOUT jaroslav@49: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jaroslav@49: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jaroslav@49: * version 2 for more details (a copy is included in the LICENSE file that jaroslav@49: * accompanied this code). jaroslav@49: * jaroslav@49: * You should have received a copy of the GNU General Public License version jaroslav@49: * 2 along with this work; if not, write to the Free Software Foundation, jaroslav@49: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jaroslav@49: * jaroslav@49: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jaroslav@49: * or visit www.oracle.com if you need additional information or have any jaroslav@49: * questions. jaroslav@49: */ jaroslav@49: jaroslav@49: package java.lang; jaroslav@49: jaroslav@49: /** jaroslav@49: * Thrown to indicate that a method has been passed an illegal or jaroslav@49: * inappropriate argument. jaroslav@49: * jaroslav@49: * @author unascribed jaroslav@49: * @see java.lang.Thread#setPriority(int) jaroslav@49: * @since JDK1.0 jaroslav@49: */ jaroslav@49: public jaroslav@49: class IllegalArgumentException extends RuntimeException { jaroslav@49: /** jaroslav@49: * Constructs an IllegalArgumentException with no jaroslav@49: * detail message. jaroslav@49: */ jaroslav@49: public IllegalArgumentException() { jaroslav@49: super(); jaroslav@49: } jaroslav@49: jaroslav@49: /** jaroslav@49: * Constructs an IllegalArgumentException with the jaroslav@49: * specified detail message. jaroslav@49: * jaroslav@49: * @param s the detail message. jaroslav@49: */ jaroslav@49: public IllegalArgumentException(String s) { jaroslav@49: super(s); jaroslav@49: } jaroslav@49: jaroslav@49: /** jaroslav@49: * Constructs a new exception with the specified detail message and jaroslav@49: * cause. jaroslav@49: * jaroslav@49: *

Note that the detail message associated with cause is jaroslav@49: * not automatically incorporated in this exception's detail jaroslav@49: * message. jaroslav@49: * jaroslav@49: * @param message the detail message (which is saved for later retrieval jaroslav@49: * by the {@link Throwable#getMessage()} method). jaroslav@49: * @param cause the cause (which is saved for later retrieval by the jaroslav@49: * {@link Throwable#getCause()} method). (A null value jaroslav@49: * is permitted, and indicates that the cause is nonexistent or jaroslav@49: * unknown.) jaroslav@49: * @since 1.5 jaroslav@49: */ jaroslav@49: public IllegalArgumentException(String message, Throwable cause) { jaroslav@49: super(message, cause); jaroslav@49: } jaroslav@49: jaroslav@49: /** jaroslav@49: * Constructs a new exception with the specified cause and a detail jaroslav@49: * message of (cause==null ? null : cause.toString()) (which jaroslav@49: * typically contains the class and detail message of cause). jaroslav@49: * This constructor is useful for exceptions that are little more than jaroslav@49: * wrappers for other throwables (for example, {@link jaroslav@49: * java.security.PrivilegedActionException}). jaroslav@49: * jaroslav@49: * @param cause the cause (which is saved for later retrieval by the jaroslav@49: * {@link Throwable#getCause()} method). (A null value is jaroslav@49: * permitted, and indicates that the cause is nonexistent or jaroslav@49: * unknown.) jaroslav@49: * @since 1.5 jaroslav@49: */ jaroslav@49: public IllegalArgumentException(Throwable cause) { jaroslav@49: super(cause); jaroslav@49: } jaroslav@49: jaroslav@49: private static final long serialVersionUID = -5365630128856068164L; jaroslav@49: }