guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception handling - symbol for encoding exception type?


From: Olivier Dion
Subject: Re: Exception handling - symbol for encoding exception type?
Date: Tue, 08 Mar 2022 14:07:49 -0500

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]