From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Any downside to condition-case-unless-debug? Date: Fri, 28 May 2021 00:44:14 -0400 Message-ID: References: <87pmxcw2rl.fsf@ericabrahamsen.net> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13424"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 28 06:44:50 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmUMc-0003FU-5e for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 06:44:50 +0200 Original-Received: from localhost ([::1]:47628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmUMa-0001Jw-Ae for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 00:44:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmUM2-0000HA-O6 for emacs-devel@gnu.org; Fri, 28 May 2021 00:44:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46010) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmUM2-0003jt-7G; Fri, 28 May 2021 00:44:14 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1lmUM2-0002rd-3D; Fri, 28 May 2021 00:44:14 -0400 In-Reply-To: <87pmxcw2rl.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Thu, 27 May 2021 09:38:22 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269971 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > I feel like a lot of my debugging recently has involved various ways of > working around `condition-case' and its swallowing of useful error > information. Is there any reason not to prefer > `condition-case-unless-debug' in new code? If we wanted to have that behavior by default, then rather than change lots of code gradually, how about making a new global flag `debug-on-caught-error' which, when t, would make errors invoke the debugger when they are about to be caught? If `debug-on-caught-error' is `debug-on-error', then the value of `debug-on-error' would control the behavior of errors about to be caught. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)