unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Samuel Bronson <naesten@gmail.com>
To: "John Wiegley" <johnw@newartisans.com>
Cc: emacs-devel@gnu.org
Subject: Re: async 1.0
Date: Thu, 5 Jul 2012 15:58:03 -0400	[thread overview]
Message-ID: <6BEF5106-911B-4105-AC76-1F6B1DC17B98@gmail.com> (raw)
In-Reply-To: <m2a9ze6e7x.fsf@newartisans.com>


On Jul 5, 2012, at 12:09 AM, John Wiegley wrote:

>>>>>> Samuel Bronson <naesten@gmail.com> writes:
>
>> I've long thought Emacs should keep the backtrace along with the
>> error/condition/exception (whichever you want to call it), like  
>> Python does:
>> the way things are now is fairly painful even for single-process  
>> debugging,
>> in all but the simplest cases.  Captured backtraces would allow the  
>> user to
>> manually examine only those errors that they are actually  
>> interested in, and
>> should permit handlers to augment them with additional information  
>> before
>> re-throwing.
>
> I agree.  Does anybody with experience in this area know how  
> difficult this
> would be to add?

I haven't got any experience to speak of, but I did notice that the  
current API for error/condition handling involves giving handlers a  
single value of the form (ERROR-SYMBOL . DATA), where ERROR-SYMBOL and  
DATA are the two things that were passed to `signal'.  There is no  
obvious place to cram an extra BACKTRACE value, and making a new type  
that acted like a cons but had an extra field would be rather evil...

I noticed this while trying to figure out how to get ert.el to report  
*both* a backtrace *and* the accompanying error message when an error  
occurs during testing.  Right now, it's easy enough to get a backtrace  
(ert.el already does this using a call to `backtrace' in an `unwind- 
protect' cleanup) or an error message (just quote/comment out the  
cleanup)...

Oh. I can just remove the "(kill-emacs 2)", I guess?  Of course, that  
changes the exit code for this case to 1, which is meant to indicate  
test failures, not testing errors.  And the backtrace is absurdly  
long, and comes before the actual error message.

I guess there's always the `debugger' variable?



  reply	other threads:[~2012-07-05 19:58 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2hau86tfk.fsf@vulcan.local.i-did-not-set--mail-host-address--so-tickle-me>
     [not found] ` <E1ShM8F-0006IY-L9@fencepost.gnu.org>
     [not found]   ` <m2txy51z1k.fsf@newartisans.com>
     [not found]     ` <E1ShiKM-0000Aa-5G@fencepost.gnu.org>
2012-06-21 21:23       ` async 1.0 John Wiegley
2012-06-22  7:00         ` Teemu Likonen
2012-06-22 10:54           ` John Wiegley
2012-06-22 12:39             ` Michael Albinus
2012-06-22 22:02               ` John Wiegley
2012-07-04 17:10                 ` Samuel Bronson
2012-07-05  4:09                   ` John Wiegley
2012-07-05 19:58                     ` Samuel Bronson [this message]
     [not found]             ` <82d34r8ej9.fsf@gmail.com>
2012-06-22 21:50               ` John Wiegley
2012-06-23  1:44                 ` Stefan Monnier
2012-06-23  3:00                 ` Stefan Monnier
2012-06-23 16:26                   ` Lennart Borgman
2012-06-23 21:08                   ` John Wiegley
2012-06-23 21:28                     ` Jeremiah Dodds
2012-06-23 21:50                     ` Thierry Volpiatto
2012-06-24 15:02                     ` Christopher Schmidt
2012-06-24 15:42                       ` Bastien
2012-06-24 21:01                       ` John Wiegley
2012-06-25 14:53                         ` Christopher Schmidt
2012-06-25 23:54                           ` John Wiegley
2012-06-24 21:12                       ` ELPA and core services John Wiegley
2012-06-24 21:40                         ` Lennart Borgman
2012-06-25  2:20                         ` Stefan Monnier
2012-06-25  4:39                         ` Stephen J. Turnbull
2012-06-25  6:01                         ` Achim Gratz
2012-07-03 14:38                           ` Tom Tromey
2013-01-22 19:13                             ` Achim Gratz
2012-06-25  4:32                       ` stdlib for Emacs? [was: async 1.0] Stephen J. Turnbull
2012-06-23  6:25                 ` async 1.0 Stephen J. Turnbull
2012-06-23 21:05                   ` John Wiegley
2012-07-01  8:16                   ` Michael Sperber
2012-06-22 11:38         ` Richard Stallman
2012-06-22 21:39           ` John Wiegley
2012-06-22 23:02             ` Richard Stallman
2012-06-23  7:46               ` zwz
2012-06-23 20:49                 ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6BEF5106-911B-4105-AC76-1F6B1DC17B98@gmail.com \
    --to=naesten@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=johnw@newartisans.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).