2.10 Exception Objects
2.10.1 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.
2.10.2 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.
2.10.3 exception?
(exception? obj) -> boolean
obj := any object
Returns true if the object obj is an exception object. This includes the builtin Gambit exceptions.
2.10.4 error?
(error? obj) -> boolean
obj := any object
Returns true if the object obj is an instance of error::t.
2.10.5 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.
2.10.6 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).
2.10.7 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.
2.10.8 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.