An embedded, single-file key-value store for OCaml, inspired by BoltDB and LMDB.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 16 lines 470 B view raw
1(** Error types for Lithos database operations *) 2 3type t = 4 | IO_error of string 5 | Invalid_database of string 6 | Database_locked 7 | Not_found 8 9let to_string = function 10 | IO_error msg -> Printf.sprintf "I/O error: %s" msg 11 | Invalid_database msg -> Printf.sprintf "Invalid database: %s" msg 12 | Database_locked -> "Database is locked" 13 | Not_found -> "Not found" 14;; 15 16let of_unix_error err path = IO_error (Printf.sprintf "%s: %s" (Unix.error_message err) path)