[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#44321] [PATCH 5/6] transformations: Raise '&formatted-message' exce
From: |
Ludovic Courtès |
Subject: |
[bug#44321] [PATCH 5/6] transformations: Raise '&formatted-message' exceptions instead of 'leave'. |
Date: |
Sat, 31 Oct 2020 11:06:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
Miguel Ángel Arruga Vivas <rosen644835@gmail.com> skribis:
> zimoun <zimon.toutoune@gmail.com> writes:
>
>> Hi,
>>
>> On Fri, 30 Oct 2020 at 00:09, Ludovic Courtès <ludo@gnu.org> wrote:
>>
>>> (transform-package-toolchain): Use 'raise' and 'formatted-message'
>>> instead of 'leave'.
>>
>> Naive question: what is the difference? Other said why? And so why not
>> replaces ’leave’ here and there by ’raise’+’formatted-message’?
>
> Probably Ludo can explain better, but the main difference I see is that
> leave (guix diagnostics) calls exit, so the client code now can handle
> these errors and it isn't forced to exit.
Exactly. In fact, ‘exit’ throws the 'quit exception, which one could
also catch, but it’s still nicer to throw &message or &formatted-message
within a module meant to be used as a library.
> The patch LGTM. Just one extra comment, this changes some format
> strings, so we shouldn't forget to send the latest pot files to TP as
> soon as we generate the branch for the release.
Yes.
Thanks,
Ludo’.
[bug#44321] [PATCH 5/6] transformations: Raise '&formatted-message' exceptions instead of 'leave'., Ludovic Courtès, 2020/10/29
[bug#44321] [PATCH 4/6] guix build: Move transformation options to (guix transformations)., Ludovic Courtès, 2020/10/29
[bug#44321] [PATCH 1/6] guix build: 'package-with-source' no longer takes a 'store' parameter., Miguel Ángel Arruga Vivas, 2020/10/30