Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Error

public class Error
extends Throwable

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Error
Known Direct Subclasses
Known Indirect Subclasses


Error is the superclass of all classes that represent unrecoverable errors. When errors are thrown, they should not be caught by application code.

See also:

Summary

Public constructors

Error()

Constructs a new Error that includes the current stack trace.

Error(String detailMessage)

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

Error(String detailMessage, Throwable throwable)

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

Error(Throwable throwable)

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

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

Error

Added in API level 1
Error ()

Constructs a new Error that includes the current stack trace.

Error

Added in API level 1
Error (String detailMessage)

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

Parameters
detailMessage String: the detail message for this error.

Error

Added in API level 1
Error (String detailMessage, 
                Throwable throwable)

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

Parameters
detailMessage String: the detail message for this error.
throwable Throwable: the cause of this error.

Error

Added in API level 1
Error (Throwable throwable)

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

Parameters
throwable Throwable: the cause of this error.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.