[gambit-list] Uncaught exception hook

Mikael mikael.trash at gmail.com
Tue Mar 23 10:31:41 EDT 2010


Marc,

I need to catch uncaught exceptions in a set of threads over here, in a way
that's transparent to Gambit's regular behavior (which is to print the error
out in the REPL, and open a new level in the REPL for it, and allow
backtraces etc.).

I want to know how to do this in two different ways (for different
purposes):

 (a) Globally to the application (something like ##thread-make-repl-channel,
but where I get the exception, and that is executed only on uncaught
exceptions, not also on GC reports etc.)

 (b) In a specific scope, i.e. a with-exception-listener , other than that
like  with-exception-catcher/handler. I.e. I get any exception thrown, into
a thunk, and when the thunk returns, the exception is passed on just like if
the thunk had not been invoked at all (thrown into the REPL or any
exception-catcher/handler outside of it).

How is this done?

Thank you,
Mikael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100323/f9f0bb21/attachment.htm>


More information about the Gambit-list mailing list