aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eval.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c
index 7ca9d761a7e..0b451b2c891 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1871,10 +1871,15 @@ probably_quit (void)
1871 unbind_to (gc_count, Qnil); 1871 unbind_to (gc_count, Qnil);
1872} 1872}
1873 1873
1874DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, 1874DEFUN ("signal", Fsignal, Ssignal, 1, 2, 0,
1875 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. 1875 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA.
1876This function does not return. 1876This function does not return.
1877 1877
1878When signaling a new error, the DATA argument is mandatory.
1879When re-signaling an error to propagate it to further handlers,
1880DATA has to be omitted and the first argument has to be the whole
1881error descriptor.
1882
1878When `noninteractive' is non-nil (in particular, in batch mode), an 1883When `noninteractive' is non-nil (in particular, in batch mode), an
1879unhandled error calls `kill-emacs', which terminates the Emacs 1884unhandled error calls `kill-emacs', which terminates the Emacs
1880session with a non-zero exit code. 1885session with a non-zero exit code.
@@ -1942,13 +1947,14 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool continuable)
1942 /* FIXME: 'handler-bind' makes `signal-hook-function' obsolete? */ 1947 /* FIXME: 'handler-bind' makes `signal-hook-function' obsolete? */
1943 /* FIXME: Here we still "split" the error object 1948 /* FIXME: Here we still "split" the error object
1944 into its error-symbol and its error-data? */ 1949 into its error-symbol and its error-data? */
1945 calln (Vsignal_hook_function, error_symbol, data); 1950 calln (Vsignal_hook_function, real_error_symbol,
1951 NILP (data) && CONSP (error) ? XCDR (error) : data);
1946 unbind_to (count, Qnil); 1952 unbind_to (count, Qnil);
1947 } 1953 }
1948 1954
1949 conditions = Fget (real_error_symbol, Qerror_conditions); 1955 conditions = Fget (real_error_symbol, Qerror_conditions);
1950 if (NILP (conditions)) 1956 if (NILP (conditions))
1951 signal_error ("Invalid error symbol", error_symbol); 1957 signal_error ("Invalid error symbol", real_error_symbol);
1952 1958
1953 /* Remember from where signal was called. Skip over the frame for 1959 /* Remember from where signal was called. Skip over the frame for
1954 `signal' itself. If a frame for `error' follows, skip that, 1960 `signal' itself. If a frame for `error' follows, skip that,