| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
7.5.15.5 SRFI-18 Exceptions
SRFI-18 exceptions are identical to the exceptions provided by Guile’s implementation of SRFI-34. The behavior of exception handlers invoked to handle exceptions thrown from SRFI-18 functions, however, differs from the conventional behavior of SRFI-34 in that the continuation of the handler is the same as that of the call to the function. Handlers are called in a tail-recursive manner; the exceptions do not “bubble up”.
- Function: with-exception-handler handler thunk
Installs handler as the current exception handler and calls the procedure thunk with no arguments, returning its value as the value of the exception. handler must be a procedure that accepts a single argument. The current exception handler at the time this procedure is called will be restored after the call returns.
- Function: raise obj
Raise obj as an exception. This is the same procedure as the same-named procedure defined in SRFI 34.
- Function: join-timeout-exception? obj
Returns
#tif obj is an exception raised as the result of performing a timed join on a thread that does not exit within the specified timeout,#fotherwise.
- Function: abandoned-mutex-exception? obj
Returns
#tif obj is an exception raised as the result of attempting to lock a mutex that has been abandoned by its owner thread,#fotherwise.
- Function: terminated-thread-exception? obj
Returns
#tif obj is an exception raised as the result of joining on a thread that exited as the result of a call tothread-terminate!.
- Function: uncaught-exception? obj
- Function: uncaught-exception-reason exc
uncaught-exception?returns#tif obj is an exception thrown as the result of joining a thread that exited by raising an exception that was handled by the top-level exception handler installed bymake-thread. When this occurs, the original exception is preserved as part of the exception thrown bythread-join!and can be accessed by callinguncaught-exception-reasonon that exception. Note that because this exception-preservation mechanism is a side-effect ofmake-thread, joining on threads that exited as described above but were created by other means will not raise thisuncaught-exceptionerror.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 20, 2013 using texi2html 5.0.
