This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 166: Add predicate and accessors for error objects

2012-10-05 12:12:56
WG1 - Core
cowan
major
cowan
fixed
source
closed
2011-05-01 01:37:46
defect

(Email from Vincent Manis)

Problem: It's impossible to write a portable error handler that writes out the message and irritants that were passed to error.

This comes about because error creates an "implementation-defined object". I would assume that this hides the whole exception class hierarchy a WG2 implementation might provide. Since the message and irritants arguments to error are presumably living in this implementation-defined object, it should be simple enough to provide accessors to extract them, so that the above "portable error handler" can be written.

Suggestion: Add the following procedures:

(error-object? object)

Returns #t if object is something created by error, #f otherwise. Any constraints on type disjointness are up to the implementation.

(error-object-message object)

Returns the message of object.

(error-object-irritants object)

Returns a list of the irritants of object.

resolution
statusnewdecided

W voted yes.

owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed