1453 |
Lisp_Object error_symbol, data; |
Lisp_Object error_symbol, data; |
1454 |
{ |
{ |
1455 |
/* When memory is full, ERROR-SYMBOL is nil, |
/* When memory is full, ERROR-SYMBOL is nil, |
1456 |
and DATA is (REAL-ERROR-SYMBOL . REAL-DATA). */ |
and DATA is (REAL-ERROR-SYMBOL . REAL-DATA). |
1457 |
|
That is a special case--don't do this in other situations. */ |
1458 |
register struct handler *allhandlers = handlerlist; |
register struct handler *allhandlers = handlerlist; |
1459 |
Lisp_Object conditions; |
Lisp_Object conditions; |
1460 |
extern int gc_in_progress; |
extern int gc_in_progress; |
1475 |
else |
else |
1476 |
real_error_symbol = error_symbol; |
real_error_symbol = error_symbol; |
1477 |
|
|
1478 |
|
#if 0 /* rms: I don't know why this was here, |
1479 |
|
but it is surely wrong for an error that is handled. */ |
1480 |
#ifdef HAVE_X_WINDOWS |
#ifdef HAVE_X_WINDOWS |
1481 |
if (display_hourglass_p) |
if (display_hourglass_p) |
1482 |
cancel_hourglass (); |
cancel_hourglass (); |
1483 |
#endif |
#endif |
1484 |
|
#endif |
1485 |
|
|
1486 |
/* This hook is used by edebug. */ |
/* This hook is used by edebug. */ |
1487 |
if (! NILP (Vsignal_hook_function)) |
if (! NILP (Vsignal_hook_function) |
1488 |
|
&& ! NILP (error_symbol)) |
1489 |
call2 (Vsignal_hook_function, error_symbol, data); |
call2 (Vsignal_hook_function, error_symbol, data); |
1490 |
|
|
1491 |
conditions = Fget (real_error_symbol, Qerror_conditions); |
conditions = Fget (real_error_symbol, Qerror_conditions); |
1492 |
|
|
1493 |
/* Remember from where signal was called. Skip over the frame for |
/* Remember from where signal was called. Skip over the frame for |
1494 |
`signal' itself. If a frame for `error' follows, skip that, |
`signal' itself. If a frame for `error' follows, skip that, |
1495 |
too. */ |
too. Don't do this when ERROR_SYMBOL is nil, because that |
1496 |
|
is a memory-full error. */ |
1497 |
Vsignaling_function = Qnil; |
Vsignaling_function = Qnil; |
1498 |
if (backtrace_list) |
if (backtrace_list && !NILP (error_symbol)) |
1499 |
{ |
{ |
1500 |
bp = backtrace_list->next; |
bp = backtrace_list->next; |
1501 |
if (bp && bp->function && EQ (*bp->function, Qerror)) |
if (bp && bp->function && EQ (*bp->function, Qerror)) |
1517 |
clause = find_handler_clause (handlerlist->handler, conditions, |
clause = find_handler_clause (handlerlist->handler, conditions, |
1518 |
error_symbol, data, &debugger_value); |
error_symbol, data, &debugger_value); |
1519 |
|
|
|
#if 0 /* Most callers are not prepared to handle gc if this returns. |
|
|
So, since this feature is not very useful, take it out. */ |
|
|
/* If have called debugger and user wants to continue, |
|
|
just return nil. */ |
|
|
if (EQ (clause, Qlambda)) |
|
|
return debugger_value; |
|
|
#else |
|
1520 |
if (EQ (clause, Qlambda)) |
if (EQ (clause, Qlambda)) |
1521 |
{ |
{ |
1522 |
/* We can't return values to code which signaled an error, but we |
/* We can't return values to code which signaled an error, but we |
1526 |
else |
else |
1527 |
error ("Cannot return from the debugger in an error"); |
error ("Cannot return from the debugger in an error"); |
1528 |
} |
} |
|
#endif |
|
1529 |
|
|
1530 |
if (!NILP (clause)) |
if (!NILP (clause)) |
1531 |
{ |
{ |