guix-patches
[Top][All Lists]
Advanced

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

[bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached check


From: Ludovic Courtès
Subject: [bug#74481] [PATCH 1/2] git: Catch Git errors when updating cached checkout.
Date: Thu, 26 Dec 2024 22:17:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Simon Tournier <zimon.toutoune@gmail.com> skribis:

> On Tue, 17 Dec 2024 at 11:55, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> We have something that can now return #f instead of throwing an
>> exception.  The many users of this interface are not prepared for this;
>> worse, getting #f instead of an exception means we lose information as
>> to why ‘update-cached-checkout’ or similar failed.
>
> Thanks for explaining.
>
> Well, I’d say “mouais“ :-) about « lose information » since I added some
> ’pk’ here or there before finding the relevant piece of code.  So the
> exception is not very helpful, not to say fully useless, IMHO.

The exception conveys information about the failure: no space left on
device, host unreachable, invalid certificate, etc.

Often ‘with-git-error-handling’ is used at the top-level because the
error is not recoverable so we just want to print an error message and
exit.

In other cases, we explicitly want to catch, say, GIT_ENOTFOUND because
there’s a fallback path in this case.

Ludo’.





reply via email to

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