Package java.lang

Class Error

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AnnotationFormatError, AssertionError, CoderMalfunctionError, FactoryConfigurationError, IOError, LinkageError, ServiceConfigurationError, ThreadDeath, TransformerFactoryConfigurationError, VirtualMachineError

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 Details

    • Error

      public Error()
      Constructs a new Error that includes the current stack trace.
    • Error

      public Error​(String detailMessage)
      Constructs a new Error 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 new Error 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 new Error with the current stack trace and the specified cause.
      Parameters:
      throwable - the cause of this error.