def wrap_failure

cswap-bend-cli@0.1.0.0 · swlive.bend:207

import cswap-bend-cli@0.1.0.0/swlive.bend as Swlive
import Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs

207def wrap_failure(r: Fs.Res(Unit)) -> Fs.Res(Unit):
208  match r:
209    case Done{u}:
210      Done{u}
211    case Fail{(code, msg)}:
212      Fail{(code, "Switch failed and was rolled back: " ++ msg)}

Uses (5)

Used by (1)