|
#ifndef SCM_EXCEPTIONS_H |
|
#define SCM_EXCEPTIONS_H |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "libguile/scm.h" |
|
|
|
|
|
|
|
typedef SCM (*scm_t_thunk) (void *data); |
|
typedef SCM (*scm_t_exception_handler) (void *data, SCM exn); |
|
|
|
SCM_INTERNAL SCM scm_c_make_thunk (scm_t_thunk body, |
|
void *body_data); |
|
SCM_INTERNAL SCM scm_c_make_exception_handler (scm_t_exception_handler h, |
|
void *handler_data); |
|
|
|
SCM_INTERNAL SCM scm_c_with_exception_handler (SCM type, |
|
scm_t_exception_handler handler, |
|
void *handler_data, |
|
scm_t_thunk thunk, |
|
void *thunk_data); |
|
|
|
SCM_INTERNAL SCM scm_c_with_default_exception_handler (scm_t_thunk thunk, |
|
void *data); |
|
|
|
SCM_INTERNAL SCM scm_with_exception_handler (SCM type, SCM handler, SCM thunk); |
|
SCM_INTERNAL SCM scm_with_pre_unwind_exception_handler (SCM handler, SCM thunk); |
|
SCM_INTERNAL SCM scm_raise_exception (SCM exn) SCM_NORETURN; |
|
|
|
SCM_INTERNAL SCM scm_exception_kind (SCM exn); |
|
SCM_INTERNAL SCM scm_exception_args (SCM exn); |
|
|
|
SCM_INTERNAL void scm_dynwind_throw_handler (void); |
|
|
|
|
|
|
|
SCM_API void scm_report_stack_overflow (void); |
|
|
|
|
|
|
|
SCM_API void scm_report_out_of_memory (void); |
|
|
|
SCM_INTERNAL void scm_init_exceptions (void); |
|
|
|
#endif |
|
|