to top
Android APIs
public class

IllegalStateException

extends RuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ java.lang.IllegalStateException
Known Direct Subclasses

Class Overview

Thrown when an action is attempted at a time when the VM is not in the correct state.

Summary

Public Constructors
IllegalStateException()
Constructs a new IllegalStateException that includes the current stack trace.
IllegalStateException(String detailMessage)
Constructs a new IllegalStateException with the current stack trace and the specified detail message.
IllegalStateException(String message, Throwable cause)
Constructs a new IllegalStateException with the current stack trace, the specified detail message and the specified cause.
IllegalStateException(Throwable cause)
Constructs a new IllegalStateException with the current stack trace and the specified cause.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public IllegalStateException ()

Added in API level 1

Constructs a new IllegalStateException that includes the current stack trace.

public IllegalStateException (String detailMessage)

Added in API level 1

Constructs a new IllegalStateException with the current stack trace and the specified detail message.

Parameters
detailMessage the detail message for this exception.

public IllegalStateException (String message, Throwable cause)

Added in API level 1

Constructs a new IllegalStateException with the current stack trace, the specified detail message and the specified cause.

Parameters
message the detail message for this exception.
cause the cause of this exception.

public IllegalStateException (Throwable cause)

Added in API level 1

Constructs a new IllegalStateException with the current stack trace and the specified cause.

Parameters
cause the cause of this exception, may be null.