Something went wrong. Try again.
An embedded, single-file key-value store for OCaml, inspired by BoltDB and LMDB.
Something went wrong. Try again.
1234567891011121314151617(** Error types for Lithos database operations *)
type t = | IO_error of string | Invalid_database of string | Database_locked | Not_found
let to_string = function | IO_error msg -> Printf.sprintf "I/O error: %s" msg | Invalid_database msg -> Printf.sprintf "Invalid database: %s" msg | Database_locked -> "Database is locked" | Not_found -> "Not found";;
let of_unix_error err path = IO_error (Printf.sprintf "%s: %s" (Unix.error_message err) path)