[plt-scheme] Idiomatic equivalent to exn:application in v299?

From: Richard Cobbe (cobbe at ccs.neu.edu)
Date: Sun Feb 6 13:47:51 EST 2005

Greetings, all.

I'm in the process of porting some old libraries from 208 to 299, and
I'm struggling a little bit with the new exception hierarchy.

Here's an example: I've got a library for implementing standard rib-cage
environments.  In the old version, the lookup function would raise an
exn:application:mismatch exception if the requested identifier is not
bound, and I'd put the unbound identifier into the exception's value
field.  (This follows hash-table-get's interface.)

What's the idiomatic equivalent under v299?  It appears from the docs
that the exn:fail:contract exception is the replacement for
exn:application:mismatch, but there's no value field.  Is there a
standard equivalent?  I'd really prefer not to marshal the value into
the message string, as the new hash-table-get does.

Thanks,

Richard




Posted on the users mailing list.