bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6375: 23.1; elisp manual example condition-case re-signal of error


From: Kevin Ryde
Subject: bug#6375: 23.1; elisp manual example condition-case re-signal of error
Date: Tue, 08 Jun 2010 11:47:03 +1000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

I had to scratch my head a bit a while ago to find out how a
condition-case handler should re-signal an error.  It'd be good if the
elisp manual had an example of that.  Just one line, as that section is
a bit wordy already.

There were two spots in emacs itself wrongly doing an apply instead of a
call for such a re-signal, so I suppose I'm not the only one to be
confused.  (The one in cedet/semantic/wisent.el might still be there.)

2010-06-08  Kevin Ryde  <user42@zip.com.au>

        * control.texi (Handling Errors): Show example of condition-case
        handler re-signalling an error.

--- control.texi.~1.7.~ 2009-02-24 08:41:24.000000000 +1100
+++ control.texi        2009-11-02 15:26:38.000000000 +1100
@@ -1019,7 +1019,11 @@
 . @var{data})}.  The handler can refer to this list to decide what to
 do.  For example, if the error is for failure opening a file, the file
 name is the second element of @var{data}---the third element of the
-error description.
+error description.  The handler can re-signal the error with
+
+@example
+(signal (car var) (cdr var))  ;; re-signal
+@end example
 
 If @var{var} is @code{nil}, that means no variable is bound.  Then the
 error symbol and associated data are not available to the handler.


In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5)
 of 2009-09-14 on raven, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' 
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' 
'--localstatedir=/var/lib' '--infodir=/usr/share/info' 
'--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim'
 '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g 
-O2' 'LDFLAGS=-g' 'CPPFLAGS=''

reply via email to

[Prev in Thread] Current Thread [Next in Thread]