V_______________________________________________________________ *)
module U = NUri
+module L = Log
module H = U.UriHash
module B = Brg
-exception ObjectNotFound of string Lazy.t
+exception ObjectNotFound of B.message
let hsize = 7000
let env = H.create hsize
(* Internal functions *******************************************************)
+let error uri = raise (ObjectNotFound (L.items1 (U.string_of_uri uri)))
+
(* Interface functions ******************************************************)
let set_obj f obj =
incr entry; H.add env uri obj; f obj
let get_obj f uri =
- try f (H.find env uri)
- with Not_found -> raise (ObjectNotFound (lazy (U.string_of_uri uri)))
+ try f (H.find env uri) with Not_found -> error uri