all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: emacs-devel@gnu.org
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: How can I rethrow an error after recording a backtrace?
Date: Fri, 5 Aug 2016 05:40:45 -0400	[thread overview]
Message-ID: <c17c72af-fc70-67fb-810b-cb31d633ade4@gmail.com> (raw)
In-Reply-To: <jwvmvksaraj.fsf-monnier+gmane.emacs.devel@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 734 bytes --]

On 2016-08-04 22:23, Stefan Monnier wrote:
>>         (setq num-nonmacro-input-events (1+ num-nonmacro-input-events))
> 
> This should be in the server.el's process sentinel, so as to consider
> emacsclient connections as "nonmacro input event".

Hmm. Even with that, I'm not sure. Take the following (untested) program:

(condition-case err1 
    (condition-case err2
        (error "A")
      (error (error "B)))
  (error (message "Oups")))

Suppose I want to capture one backtrace for each of the signals in this program.  Assuming I register a debugger that re-throws all errors that it receives, won't the second error slip through, due to the nonmacro input event counter not having been increased?

Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-08-05  9:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  2:12 How can I rethrow an error after recording a backtrace? Clément Pit--Claudel
2016-08-05  2:23 ` Stefan Monnier
2016-08-05  9:40   ` Clément Pit--Claudel [this message]
2016-08-06  2:11     ` Stefan Monnier
2016-08-06 10:03       ` Eli Zaretskii
2016-08-06 13:29         ` Stefan Monnier
2016-08-05  2:34 ` Clément Pit--Claudel
2016-08-05  6:12   ` Eli Zaretskii
     [not found]     ` <73dc7988-7b41-385d-1083-6a6fa4bfbd91@gmail.com>
2016-08-05 13:40       ` Eli Zaretskii
2016-08-05 15:38         ` Clément Pit--Claudel
2016-08-06 10:02           ` Eli Zaretskii
2016-08-06 15:24             ` Clément Pit--Claudel
2016-08-06 15:31               ` Eli Zaretskii
2016-08-06 15:49                 ` Clément Pit--Claudel
2016-08-06 17:38                   ` Eli Zaretskii

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=c17c72af-fc70-67fb-810b-cb31d633ade4@gmail.com \
    --to=clement.pit@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.