[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert |
Date: |
Sun, 06 Nov 2016 17:47:22 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> Oh, I see; it would be helpful if you had included the rational in the
> commit message where you introduced it.
Indeed.
>> > 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.
Not if the code is run within an `ignore-errors` clause or some other
condition-case catching `error`.
> 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))
Works for me.
Stefan
Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert, Philipp Stephani, 2016/11/06