java.lang

Class IllegalStateException

public class IllegalStateException extends RuntimeException

Thrown when a method is invoked at an illegal or inappropriate time. For example:
 void m(Collecion c)
 {
   c.iterator().remove();
 }
 

Since: 1.1

UNKNOWN: updated to 1.5

Constructor Summary
IllegalStateException()
Create an exception without a message.
IllegalStateException(String s)
Create an exception with a message.
IllegalStateException(String message, Throwable cause)

Constructs a IllegalStateException using the specified error message, which should give further details as to the reason for this exception.

IllegalStateException(Throwable cause)

Constructs a IllegalStateException using the specified cause Throwable, which may be used to provide additional history, with regards to the root of the problem.

Constructor Detail

IllegalStateException

public IllegalStateException()
Create an exception without a message.

IllegalStateException

public IllegalStateException(String s)
Create an exception with a message.

Parameters: s the message

IllegalStateException

public IllegalStateException(String message, Throwable cause)

Constructs a IllegalStateException using the specified error message, which should give further details as to the reason for this exception. The specified cause Throwable may be used to provide additional history, with regards to the root of the problem. It is perfectly valid for this to be null, if the cause of the problem is unknown.

Note: the detail message from the cause is not automatically incorporated into the resulting detail message of this exception.

Parameters: message the detail message, which should give the reason for this exception being thrown. cause the cause of this exception, or null if the cause is unknown.

Since: 1.5

IllegalStateException

public IllegalStateException(Throwable cause)

Constructs a IllegalStateException using the specified cause Throwable, which may be used to provide additional history, with regards to the root of the problem. It is perfectly valid for this to be null, if the cause of the problem is unknown.

The detail message is automatically constructed from the detail message of the supplied causal exception. If the cause is null, then the detail message will also be null. Otherwise, the detail message of this exception will be that of the causal exception. This makes this constructor very useful for simply wrapping another exception.

Parameters: cause the cause of this exception, or null if the cause is unknown.

Since: 1.5