def wait.host_error

mylsm-lsm-store@0.6.0.1 · src/DbLock.bend:158

import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock
import Base
import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError

158# Closes the lock file and classifies a clock or sleep host failure.
159def wait.host_error(
160  file: File,
161  error: U32 & String,
162  operation: String,
163  path: String
164) -> IO(Result<&1, &1, DurableError.Error, Lock>):
165  match error:
166    case (code, message):
167      do IO<Result<&1, &1, DurableError.Error, Lock>>:
168        _closed : Unit <- File.close(file)
169        return Fail{DurableError.classify_open(
170          DurableError.OpenHostFailure{code, message}, operation, path)}

Uses (15)

Used by (2)