[plt-scheme] user defined exceptions

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Tue Jan 20 10:40:09 EST 2004

--- "David J. Neu" <djneu at att.net> wrote:
> I was wondering if I could get some guidance on how
> to create a set of "user defined" exceptions...

I haven't seen any answers to this, so...

Do this:

> 1. Create a subtype of the structure exn.  For
> example, I created
>    a subtype called exn:db using
>          (define-struct (exn:db  exn) ())
>    and then when the condition that triggered the
> exception was encountered 

Do this

  (let ((e (make-exn:db "mesg"
    (raise e))


Email: noelwelsh <at> yahoo <dot> com
Jabber: noelw <at> jabber <dot> org

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

Posted on the users mailing list.