GNU bug report logs - #44321
[PATCH 0/6] Adding a (guix transformations) module

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Thu, 29 Oct 2020 23:09:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #64 received at 44321 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>,
 44321 <at> debbugs.gnu.org
Subject: Re: [bug#44321] [PATCH 5/6] transformations: Raise
 '&formatted-message' exceptions instead of 'leave'.
Date: Mon, 2 Nov 2020 13:25:20 +0100
Hi,

Thanks for the explanation.

On Sat, 31 Oct 2020 at 11:06, Ludovic Courtès <ludo <at> gnu.org> wrote:

> >> 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.

And so why not replace the 'leave' appearing here and there in the
code by 'raise'+'formatted-message'?


Cheers,
simon




This bug report was last modified 4 years and 294 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.