[racket] with-handlers and exception structure

From: Danny Yoo (dyoo at hashcollision.org)
Date: Mon Sep 3 10:56:11 EDT 2012

On Monday, September 3, 2012, Gregory Woodhouse wrote:

> Dumb question: If an exception is handled by (lambda (e) ... ) is it
> possible to recover exception details such as any message that may have
> been used in a raise or related statement?

Hi Gregory,

The value raised by exceptions should be structured; in most cases, the
exception value will be an instance of the exn:fail struct.  Take a look at
the definition of the exn struct.  The exn-message function, in
particular, should let you select out the string message associated to the
raised exception.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120903/f690bbf6/attachment-0001.html>

Posted on the users mailing list.