OxL Reference

data KvError

A store operation failed: kind says whether to retry, msg is the detail.

Example:

oxl✓ checked in CI
use std.kv { Kv, KvError }

fn main() io, db {
  let kv = Kv.open("docs-kverror")!
  match kv.get("missing") {
    bytes _ => print("found")
    none => print("no such key")
    KvError e => print("failed")
  }
  kv.close()
}
Output
no such key
@error pub(api) data KvError

Since. 1.0.0-beta

Fields

pub(api) kind: KvErrorKind

What went wrong.

pub(api) msg: str

Detail text.

Defined in: std/kv/kv.oxl:117

See also