From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert Date: Sun, 06 Nov 2016 17:47:22 -0500 Message-ID: References: <20161105015720.6371.89806@vcs.savannah.gnu.org> <20161105015720.88A6322012D@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1478472473 19833 195.159.176.226 (6 Nov 2016 22:47:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2016 22:47:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 06 23:47:49 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3WDq-0002NM-HC for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2016 23:47:30 +0100 Original-Received: from localhost ([::1]:48829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3WDt-0001jK-Gd for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2016 17:47:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3WDn-0001iu-Ew for emacs-devel@gnu.org; Sun, 06 Nov 2016 17:47:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3WDk-0007ZU-Aa for emacs-devel@gnu.org; Sun, 06 Nov 2016 17:47:27 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:34079) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3WDk-0007Z6-6J for emacs-devel@gnu.org; Sun, 06 Nov 2016 17:47:24 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DdBQALW9BX/9yNSC1dGwEBAQMBAQGDLQEBAQEBHoRNhVCvdoIDhhYEAgKBaToTAQIBAQEBAQEBXieEYgEBAwFWIwULCw4mEhQYDSSIVQi8VQEBAQcCASSKfYocBYgnhnZChC2FTZkNhguQSyABM4RuHoYKAQEB X-IPAS-Result: A0DdBQALW9BX/9yNSC1dGwEBAQMBAQGDLQEBAQEBHoRNhVCvdoIDhhYEAgKBaToTAQIBAQEBAQEBXieEYgEBAwFWIwULCw4mEhQYDSSIVQi8VQEBAQcCASSKfYocBYgnhnZChC2FTZkNhguQSyABM4RuHoYKAQEB X-IronPort-AV: E=Sophos;i="5.30,296,1470715200"; d="scan'208";a="278361414" Original-Received: from 45-72-141-220.cpe.teksavvy.com (HELO fmsmemgm.homelinux.net) ([45.72.141.220]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Nov 2016 17:47:22 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id AD661AE0F1; Sun, 6 Nov 2016 17:47:22 -0500 (EST) In-Reply-To: (Noam Postavsky's message of "Sun, 6 Nov 2016 13:28:46 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209230 Archived-At: > 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