changeset 24054:19ff7845d5f7

(find_handler_clause): If SIG is nil (memory full error), never run the debugger, and don't bother checking the args to see whether the debugger should be run.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Jan 1999 18:09:31 +0000
parents 551467b8a092
children 02187e077463
files src/eval.c
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Mon Jan 11 17:37:34 1999 +0000
+++ b/src/eval.c	Mon Jan 11 18:09:31 1999 +0000
@@ -1212,6 +1212,8 @@
 DATA should be a list.  Its elements are printed as part of the error message.\n\
 If the signal is handled, DATA is made available to the handler.\n\
 See also the function `condition-case'.")
+     /* When memory is full, ERROR-SYMBOL is nil,
+	and DATA is (REAL-ERROR-SYMBOL . REAL-DATA).  */
   (error_symbol, data)
      Lisp_Object error_symbol, data;
 {
@@ -1361,8 +1363,9 @@
 
 /* Value of Qlambda means we have called debugger and user has continued.
    There are two ways to pass SIG and DATA:
-    - SIG is the error symbol, and DATA is the rest of the data.
+    = SIG is the error symbol, and DATA is the rest of the data.
     = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA).
+       This is for memory-full errors only.
 
    Store value returned from debugger into *DEBUGGER_VALUE_PTR.  */
 
@@ -1385,11 +1388,16 @@
       int count = specpdl_ptr - specpdl;
       int debugger_called = 0;
       Lisp_Object sig_symbol, combined_data;
+      /* This is set to 1 if we are handling a memory-full error,
+	 because these must not run the debugger.
+	 (There is no room in memory to do that!)  */
+      int no_debugger = 0;
 
       if (NILP (sig))
 	{
 	  combined_data = data;
 	  sig_symbol = Fcar (data);
+	  no_debugger = 1;
 	}
       else
 	{
@@ -1408,9 +1416,10 @@
 					       Fbacktrace, Qnil);
 #endif
 	}
-      if ((EQ (sig_symbol, Qquit)
-	   ? debug_on_quit
-	   : wants_debugger (Vdebug_on_error, conditions))
+      if (! no_debugger
+	  && (EQ (sig_symbol, Qquit)
+	      ? debug_on_quit
+	      : wants_debugger (Vdebug_on_error, conditions))
 	  && ! skip_debugger (conditions, combined_data)
 	  && when_entered_debugger < num_nonmacro_input_events)
 	{