Exception Objects

exception::t

(def exception::t)

Base class for all Gerbil-derived exception types. It's an empty struct type that extends the Gambit builtin exception record type.

See also Exception Base Classes.

error::t

(def error::t)

Base class for all Gerbil-derived errors. It's a struct type that extends exception::t and has 3 fields: message, irritants, and trace.

See also Exception Base Classes.

exception?

(exception? obj) -> boolean

  obj := any object

Returns true if the object obj is an exception object. This includes the builtin Gambit exceptions.

error?

(error? obj) -> boolean

  obj := any object

Returns true if the object obj is an instance of error::t.

error-object?

(error-object? obj) -> boolean

  obj := any object

Returns true if the object obj is an exception object raised by the builtin error procedure. Note that this is separate from instances of error::t; nomenclature.

error-message

(error-message obj) -> string

  obj := any object

Returns the message associated with an error instance. If the object obj is not an error instance, it returns the result of (display-exception obj).

error-irritants

(error-irritants obj) -> list | #f

  obj := any object

Returns the irritants associated with an error instance. If the object obj is not an error instance, it returns #f.

error-trace

(error-trace obj) -> any

  obj := any object

Returns the trace associated with an error instance. If the object obj is not an error instance, it returns #f.