From: "Drew Adams" <drew.adams@oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi@gnus.org>
Cc: 9329@debbugs.gnu.org
Subject: bug#9329: 24.0.50; `condition-case' with (debug...) is broken
Date: Fri, 19 Aug 2011 06:18:16 -0700 [thread overview]
Message-ID: <B1D4AAAE093D4737BBBABBEF908E4332@us.oracle.com> (raw)
In-Reply-To: <m3hb5dmvio.fsf@stories.gnus.org>
> > (let ((debug-on-error t)
> > (eval-expression-debug-on-error t))
> > (condition-case nil (/ 1 0)
> > ((debug error) "Test")))
> >
> > The debugger is not opened. In Emacs 23.3 it is opened (as
> > the doc says it should be).
>
> The car of a handler may be a list of condition names
> instead of a single condition name. Then it handles all of them.
Yes. So? (debug error) is a list of condition names. It is the car of a handler
(the only handler).
> So it seems to be doing what it's supposed to be doing.
No. Check the doc. Check Emacs 23 - e.g., 23.3.1.
> Is this what you wanted to say instead?
> (condition-case error
> (/ 1 0)
> (error (debug error) "Test"))
No.
C-h i, Elisp, g handling errors
"If an error is handled by some `condition-case' form, this
ordinarily prevents the debugger from being run, even if
`debug-on-error' says this error should invoke the debugger.
If you want to be able to debug errors that are caught by a
`condition-case', set the variable `debug-on-signal' to a non-`nil'
value. You can also specify that a particular handler should let the
debugger run first, by writing `debug' among the conditions, like this:
(condition-case nil
(delete-file filename)
((debug error) nil))
"
Put the cursor after that sexp. `C-x C-e'. Do the same thing in Emacs 23.
next prev parent reply other threads:[~2011-08-19 13:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 3:47 bug#9329: 24.0.50; `condition-case' with (debug...) is broken Drew Adams
2011-08-19 12:32 ` Lars Magne Ingebrigtsen
2011-08-19 13:18 ` Drew Adams [this message]
2011-08-20 21:17 ` Chong Yidong
2011-08-21 3:50 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B1D4AAAE093D4737BBBABBEF908E4332@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=9329@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.