[plt-scheme] user defined exceptions
--- "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"
(current-continuation-marks))))
(raise e))
HTH,
Noel
=====
Email: noelwelsh <at> yahoo <dot> com
Jabber: noelw <at> jabber <dot> org
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus