Fantom

 

const class

sys::Err

sys::Obj
  sys::Err

Err is the base class of all exceptions.

Slots

causeSource

Err? cause()

Get the underyling cause exception or null.

makeSource

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

Construct with specified error message and optional root cause.

msgSource

Str msg()

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

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Return the qualified type name and optional message.

traceSource

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

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

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

  • "maxDepth": Int specifies how many methods in each
    exception of chain to include.  If unspecified the
    default is 20.
traceToStrSource

Str traceToStr()

Dump the stack trace of this exception to a Str.