From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Olivier Dion via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: Re: Exception handling - symbol for encoding exception type? Date: Tue, 08 Mar 2022 14:07:49 -0500 Message-ID: <87ee3cdzzu.fsf@laura> References: <18366d41-ee52-9122-997e-cd18b04ece3f@posteo.de> Reply-To: Olivier Dion Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21613"; mail-complaints-to="usenet@ciao.gmane.io" To: Zelphir Kaltstahl , guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Mar 08 20:08:30 2022 Return-path: Envelope-to: guile-user@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 1nRfCA-0005SO-Hz for guile-user@m.gmane-mx.org; Tue, 08 Mar 2022 20:08:30 +0100 Original-Received: from localhost ([::1]:52478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRfC9-00050Q-GW for guile-user@m.gmane-mx.org; Tue, 08 Mar 2022 14:08:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRfBl-0004zt-5E for guile-user@gnu.org; Tue, 08 Mar 2022 14:08:06 -0500 Original-Received: from smtp.polymtl.ca ([132.207.4.11]:41326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRfBi-0002kG-3X for guile-user@gnu.org; Tue, 08 Mar 2022 14:08:03 -0500 Original-Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 228J7nqc026861 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 8 Mar 2022 14:07:54 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 228J7nqc026861 In-Reply-To: <18366d41-ee52-9122-997e-cd18b04ece3f@posteo.de> X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Tue, 8 Mar 2022 19:07:49 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18167 Archived-At: On Tue, 08 Mar 2022, Zelphir Kaltstahl wrote: > I think in some other languages this would be encoded in > the type or class or the exception itself. One would catch > only exceptions of a specific type. This is a convention > inside the code, which does not necessarily spread to other > programs or code bases. I would almost always make a type if the exception can be handled by user code. For internal raise/catch, not necessary. This is also better for testing purpose with srfi-64 `test-error` where you can specify the error type. -- Olivier Dion Polymtl