mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-17 02:01:19 -07:00
exceptions: make escape signal an exception not internal error
This commit is contained in:
parent
67418ed1c7
commit
19de2a53bd
3 changed files with 8 additions and 2 deletions
|
|
@ -137,6 +137,9 @@ ecl_exception_handler(cl_object o)
|
|||
case ECL_EX_F_INVAL:
|
||||
FEinvalid_function(arg1);
|
||||
break;
|
||||
case ECL_EX_S_FMISS:
|
||||
FEcontrol_error("UNWIND: frame ~s not found.", 1, arg1);
|
||||
break;
|
||||
default:
|
||||
ecl_internal_error("Unknown exception type.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ void
|
|||
ecl_escape(cl_object continuation)
|
||||
{
|
||||
ecl_frame_ptr fr = frs_sch(continuation);
|
||||
if (!fr) ecl_internal_error("si_fear_handler: continuation not found!");
|
||||
if (!fr) {
|
||||
ecl_ferror(ECL_EX_S_FMISS, continuation, ECL_NIL);
|
||||
}
|
||||
ecl_unwind(ecl_process_env(), fr);
|
||||
_ecl_unexpected_return();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1017,7 +1017,8 @@ typedef enum {
|
|||
ECL_EX_V_BNAME, /* illegal variable name */
|
||||
ECL_EX_F_NARGS, /* wrong number of arguments */
|
||||
ECL_EX_F_UNDEF, /* undefined function */
|
||||
ECL_EX_F_INVAL /* non-function passed as function */
|
||||
ECL_EX_F_INVAL, /* non-function passed as function */
|
||||
ECL_EX_S_FMISS /* missing unwind frame (ecl_escape) */
|
||||
} ecl_ex_type;
|
||||
|
||||
#define ECL_EXCEPTIONP(x) ((ECL_IMMEDIATE(x)==0) && ((x)->d.t==t_exception))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue