unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Olivier Dion via General Guile related discussions <guile-user@gnu.org>
To: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>,
	guile-user <guile-user@gnu.org>
Subject: Re: Exception handling - symbol for encoding exception type?
Date: Tue, 08 Mar 2022 14:07:49 -0500	[thread overview]
Message-ID: <87ee3cdzzu.fsf@laura> (raw)
In-Reply-To: <18366d41-ee52-9122-997e-cd18b04ece3f@posteo.de>

On Tue, 08 Mar 2022, Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> 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



      parent reply	other threads:[~2022-03-08 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 17:11 Exception handling - symbol for encoding exception type? Zelphir Kaltstahl
2022-03-08 17:48 ` Vivien Kraus
2022-03-08 18:18 ` Maxime Devos
2022-03-08 18:20 ` Maxime Devos
2022-04-07 21:39   ` Zelphir Kaltstahl
2022-03-08 18:22 ` Maxime Devos
2022-03-08 19:07 ` Olivier Dion via General Guile related discussions [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee3cdzzu.fsf@laura \
    --to=guile-user@gnu.org \
    --cc=olivier.dion@polymtl.ca \
    --cc=zelphirkaltstahl@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).