[plt-scheme] with-handlers and mzscheme extensions
Hi!
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.
For example, if the C code for the extension includes the line:
scheme_signal_error("error: exception-2 has occurred)
I'd like to be able to do something like this:
(with-handlers
((exception-1? (lambda (aexn) (printf "exception1~n")))
(exception-2? (lambda (aexn) (printf "exception2~n"))))
(connection-open "dbname=test user=myusername password=mypassword"))
Many thanks for any help!
--David