GNU bug report logs - #6375
23.1; elisp manual example condition-case re-signal of error

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Tue, 8 Jun 2010 01:49:02 UTC

Severity: minor

Tags: patch

Found in version 23.1

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kevin Ryde <user42 <at> zip.com.au>
To: 6375 <at> debbugs.gnu.org
Subject: bug#6375: 23.1; elisp manual example condition-case re-signal of error
Date: Tue, 08 Jun 2010 11:47:03 +1000
[Message part 1 (text/plain, inline)]
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 <at> zip.com.au>

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

[control.texi.re-signal-error.diff (text/x-diff, inline)]
--- 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.
[Message part 3 (text/plain, inline)]


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=''

This bug report was last modified 15 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.