Subject: Re: [bug#36845] [PATCH] machine: Implement 'roll-back-machine'.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 01 Sep 2019 23:25:24 +0200

Hello Jakob,

This was applied as 9c70c460a05b2bc60f3f3602f0a2dba0f79ce86c, so closing
now!  Really nice as usual.

One comment:

[email-masked] (Jakob L. Kreuze) skribis:

> +(define-syntax-rule (with-roll-back should-roll-back? mbody ...)
> +  "Catch exceptions that arise when binding MBODY, a monadic expression in
> +%STORE-MONAD, and collect their arguments in a &deploy-error condition, with
> +the 'should-roll-back' field set to SHOULD-ROLL-BACK?"
> +  (catch #t
> +    (lambda ()
> +      mbody ...)
> +    (lambda args
> +      (raise (condition (&deploy-error
> +                         (should-roll-back should-roll-back?)
> +                         (captured-args args)))))))

If I’m not mistaken, this won’t have the desired effect, and I think we
should do something akin to what ‘with-shepherd-error-handling’ does.

WDYT?

Thanks,
Ludo’.