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

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

    A description of the problem.

  • cause = null

    The underlying cause of this exception.

Attributes
causeSource Code

The underlying cause of this exception.

messageSource Code
shared default String message

A message describing the problem. This default implementation returns the description, if any, or otherwise the message of the cause, if any.

See also: cause
stringSource Code
shared actual default String string

A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the hash of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation.

Refined declaration: string
Inherited Attributes
Attributes inherited from: Object
Methods
printStackTraceSource Code
shared void printStackTrace()

Print the stack trace to the standard error of the virtual machine process.

Inherited Methods
Methods inherited from: Object