type

Err

src const class Err : Obj

Err is the base class of all exceptions.

constructors

make

Construct with specified error message and optional root cause.

methods

cause

Get the underyling cause exception or null.

msg

Get the string message passed to the contructor or empty string if a message is not available.

toStr

Return the qualified type name and optional message.

trace

Dump the stack trace of this exception to the specified output stream (or Env.cur.err by default).

traceToStr

Dump the stack trace of this exception to a Str.

Slot Details

cause

src Err? cause()

Get the underyling cause exception or null.

make

src new make(Str msg := "", Err? cause := null)

Construct with specified error message and optional root cause.

msg

src Str msg()

Get the string message passed to the contructor or empty string if a message is not available.

toStr

src virtual override Str toStr()

Return the qualified type name and optional message.

trace

src This trace(OutStream out := Env.cur().err(), [Str:Obj]? options := null)

Dump the stack trace of this exception to the specified output stream (or Env.cur.err by default). Return this.

The options may be used to specify the format of the output:

  • "indent": Int for initial number of indentation spaces
  • "maxDepth": Int specifies how many methods in each
    exception of chain to include.  If unspecified the
    default is configured from the "errTraceMaxDepth" prop
    in etc/sys/config.props.

traceToStr

src Str traceToStr()

Dump the stack trace of this exception to a Str.