all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert
Date: Sun, 6 Nov 2016 13:28:46 -0500	[thread overview]
Message-ID: <CAM-tV-_Mf=mK40NCx=BUAya2O8RN1C27hE6k=tQUnadMUAxBLg@mail.gmail.com> (raw)
In-Reply-To: <jwv4m3lvo5b.fsf-monnier+emacsdiffs@gnu.org>

On Sat, Nov 5, 2016 at 1:22 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> >     Don't call debug on failed cl-assert
>
> That's really too bad: I introduced it very explicitly because I found
> it extremely convenient.

Oh, I see; it would be helpful if you had included the rational in the
commit message where you introduced it.

>
> > Doing this causes problems when running ert tests
>
> Can it be fixed somewhere else?

I don't quite understand what's the benefit of calling debug when
debug-on-error is non-nil: signalling the error is going to call it
anyway.

But it looks like funcalling `debugger' instead of calling `debug'
seems to work:

(defun cl--assertion-failed (form &optional string sargs args)
  (if debug-on-error
      (funcall debugger `(cl-assertion-failed ,form ,string ,@sargs))
    (if string
        (apply #'error string (append sargs args))
      (signal 'cl-assertion-failed `(,form ,@sargs)))))



  reply	other threads:[~2016-11-06 18:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20161105015720.6371.89806@vcs.savannah.gnu.org>
     [not found] ` <20161105015720.88A6322012D@vcs.savannah.gnu.org>
2016-11-05 17:22   ` [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert Stefan Monnier
2016-11-06 18:28     ` Noam Postavsky [this message]
2016-11-06 22:47       ` Stefan Monnier
2016-11-08  1:12         ` Noam Postavsky
2016-11-08 13:17           ` Stefan Monnier
2016-11-08 14:32             ` Stefan Monnier
2016-11-09  0:55               ` Noam Postavsky
2017-01-28  1:16                 ` Clément Pit--Claudel
2017-01-28  1:59                   ` Noam Postavsky
2017-01-28  3:30                     ` Clément Pit--Claudel
2017-01-28  3:46                       ` Noam Postavsky
2017-01-29 15:37                         ` Noam Postavsky
2017-01-29 21:09                           ` Clément Pit-Claudel
2017-01-31  2:53                             ` Noam Postavsky
2016-11-06 19:03     ` Philipp Stephani
2017-01-28  1:13       ` Clément Pit-Claudel

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='CAM-tV-_Mf=mK40NCx=BUAya2O8RN1C27hE6k=tQUnadMUAxBLg@mail.gmail.com' \
    --to=npostavs@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.