The supertype of all unexpected transient failures. An Exception is usually unrecoverable from the point of view of the immediate caller of an operation.

For example, code that interacts with a relational database isn't typically written to recover from transaction rollback or loss of network connectivity. However, these conditions aren't completely unrecoverable from the point of view of the program's generic exception handling infrastructure. Therefore, they are best treated as Exceptions.

A subclass of Exception represents a more specific kind of problem, and may define additional attributes which propagate information about problems of that kind.

By: Gavin, Tom
Exception(String? description = null, Throwable? cause = null)
  • description = null

    A description of the problem.

  • cause = null

    The underlying cause of this exception.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Throwable
Inherited Methods
Methods inherited from: Object
Methods inherited from: Throwable