static SCM scscm_recording_unwind_handler (void *datap, SCM key, SCM args) { struct with_catch_data *data = datap; /* We need to record the stack in the exception since we're about to throw and lose the location that got the exception. We do this by wrapping the exception + stack in a new exception. */ if (gdbscm_is_true (data->stack)) return gdbscm_make_exception_with_stack (key, args, data->stack); return gdbscm_make_exception (key, args); }
SCM gdbscm_make_error_scm (SCM key, SCM subr, SCM message, SCM args, SCM data) { return gdbscm_make_exception (key, scm_list_4 (subr, message, args, data)); }
SCM gdbscm_make_exception_with_stack (SCM key, SCM args, SCM stack) { return gdbscm_make_exception (with_stack_error_symbol, scm_cons (key, scm_cons (stack, args))); }