Raw_store: document the Missing_key error

This commit is contained in:
Grégoire Henry 2017-09-29 18:43:13 +02:00 committed by Benjamin Canou
parent 900f16228b
commit 3909baaedc

View File

@ -16,6 +16,20 @@ type value = MBytes.t
type error += Unknown of string list type error += Unknown of string list
let () =
Error_monad.register_error_kind
`Permanent
~id:"raw_store.unknown"
~title:"Missing key in store"
~description:"Missing key in store"
~pp:(fun ppf keys ->
Format.fprintf ppf
"Missing key in store: %s"
(String.concat "/" keys))
Data_encoding.(obj1 (req "key" (list string)))
(function Unknown keys -> Some keys | _ -> None)
(fun keys -> Unknown keys)
let concat = String.concat "/" let concat = String.concat "/"
let split = String.split_on_char '/' let split = String.split_on_char '/'