all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6375: 23.1; elisp manual example condition-case re-signal of error
@ 2010-06-08  1:47 Kevin Ryde
  2010-06-08  8:10 ` Juri Linkov
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2010-06-08  1:47 UTC (permalink / raw)
  To: 6375

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: control.texi.re-signal-error.diff --]
[-- Type: text/x-diff, Size: 642 bytes --]

--- 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.

[-- Attachment #3: Type: text/plain, Size: 733 bytes --]




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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#6375: 23.1; elisp manual example condition-case re-signal of error
  2010-06-08  1:47 bug#6375: 23.1; elisp manual example condition-case re-signal of error Kevin Ryde
@ 2010-06-08  8:10 ` Juri Linkov
  0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2010-06-08  8:10 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 6375

> 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/





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-08  8:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-08  1:47 bug#6375: 23.1; elisp manual example condition-case re-signal of error Kevin Ryde
2010-06-08  8:10 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.