GNU bug report logs - #20066
24.4; should-error and cl-assert

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Mon, 9 Mar 2015 08:07:02 UTC

Severity: normal

Found in version 24.4

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Liu <sdl.web <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#20066: closed (24.4; should-error and cl-assert)
Date: Wed, 08 Apr 2015 04:16:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 08 Apr 2015 12:15:38 +0800
with message-id <m28ue3i7bp.fsf <at> gmail.com>
and subject line Re: bug#20066: 24.4; should-error and cl-assert
has caused the debbugs.gnu.org bug report #20066,
regarding 24.4; should-error and cl-assert
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
20066: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20066
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4; should-error and cl-assert
Date: Mon, 09 Mar 2015 16:06:44 +0800
I just compiled emacs 25.0.50 from git and I have immediately noticed
the following difference:

1. (should-error (error "yes"))
2. (should-error (cl-assert nil t))

Test 1 succeeds but test 2 fails. In emacs 24.4, both tests succeed.
Could someone investigate what have caused this incompatibility?

Thanks,
Leo


[Message part 3 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 20066-done <at> debbugs.gnu.org
Subject: Re: bug#20066: 24.4; should-error and cl-assert
Date: Wed, 08 Apr 2015 12:15:38 +0800
On 2015-04-08 10:05 +0800, Stefan Monnier wrote:
> I think test 2 is incorrect.  It assumes that when cl-assert fails it
> reacts by throwing a "normal" signal that can be caught like any other.
> This is untrue for example when we decide to compile-away the assertions
> (depending on speed ans safety settings).
>
> cl-assert should be used to check impossible situations and an assertion
> failure is just supposed to bring it to the user's attention to help
> debug the code.  It is not meant to be caught&handled like a normal
> signal.

OK, that makes sense.

Leo


This bug report was last modified 10 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.