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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6375 in the body.
You can then email your comments to 6375 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6375; Package emacs. (Tue, 08 Jun 2010 01:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kevin Ryde <user42 <at> zip.com.au>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Jun 2010 01:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kevin Ryde <user42 <at> zip.com.au>
To: bug-gnu-emacs <at> gnu.org
Subject: 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=''

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6375; Package emacs. (Tue, 08 Jun 2010 08:29:01 GMT) Full text and rfc822 format available.

Message #8 received at 6375 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 6375 <at> debbugs.gnu.org
Subject: Re: bug#6375: 23.1;
	elisp manual example condition-case re-signal of error
Date: Tue, 08 Jun 2010 11:10:02 +0300
> 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.

Two months ago we already added exactly the same example
in `Handling Errors'.  Please see in the development sources,
not in the 23.1 release.

-- 
Juri Linkov
http://www.jurta.org/emacs/




bug closed, send any further explanations to Kevin Ryde <user42 <at> zip.com.au> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Fri, 11 Jun 2010 01:33:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Jul 2010 11:24:03 GMT) Full text and rfc822 format available.

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.