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

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