[plt-scheme] with-handlers and mzscheme extensions

From: David J. Neu (djneu at att.net)
Date: Mon Aug 23 16:31:02 EDT 2004


Thanks, for the information.

In mzscheme I can do something like this:

(define-struct (exn:my-exn  exn) ())
(define-struct (exn:my-exn:sub-exn  exn:my-exn) ())


(let ((e (my-exn "opps" (current-continuation-marks))))
   (raise e))

I guess what I'm really looking to do is do the same thing from my
mzscheme extension.  That is, create my own exception type in the C
code of the mzscheme extension and then have the ability to raise one
of these new exceptions from the mzscheme extension.

Thanks again!

On Sun, Aug 22, 2004 at 09:07:15PM -0700, Matthew Flatt wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> At Sat, 21 Aug 2004 17:03:08 -0400, "David J. Neu" wrote:
> > I'm writing a mzscheme extension that raises some exceptions using
> > scheme_signal_error, and I'm wondering which predicate I could use in
> > with-handlers to determine which exception was raised.
> scheme_signal_error() raises `exn:misc' in v20x.
> In v299 (where the exception hierarchy was revised again), it raises
> `exn:fail'.
> Matthew

Posted on the users mailing list.