Package java.lang
Class Error
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- All Implemented Interfaces:
Serializable
,Modified
- Direct Known Subclasses:
IOError
,LinkageError
public class Error extends Throwable
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:
Throwable
,Exception
,RuntimeException
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Error()
Constructs a newError
that includes the current stack trace.Error(String detailMessage)
Constructs a newError
with the current stack trace and the specified detail message.Error(String detailMessage, Throwable throwable)
Constructs a newError
with the current stack trace, the specified detail message and the specified cause.Error(Throwable throwable)
Constructs a newError
with the current stack trace and the specified cause.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace, printStackTrace, toString
-
-
-
-
Constructor Detail
-
Error
public Error()
Constructs a newError
that includes the current stack trace.
-
Error
public Error(String detailMessage)
Constructs a newError
with the current stack trace and the specified detail message.- Parameters:
detailMessage
- the detail message for this error.
-
Error
public Error(String detailMessage, Throwable throwable)
Constructs a newError
with the current stack trace, the specified detail message and the specified cause.- Parameters:
detailMessage
- the detail message for this error.throwable
- the cause of this error.
-
Error
public Error(Throwable throwable)
Constructs a newError
with the current stack trace and the specified cause.- Parameters:
throwable
- the cause of this error.
-
-