X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fgetter%2Fhttp_getter_map.ml;h=4bead0c6cb9e3a8fd0176466fb18cbf8eb1f62ba;hb=275727242ccdce9df01af65f3bfb2d65283fa197;hp=e3a4ab2fcfbb389475f10e692cf6114e5a907451;hpb=1fd0f95688fb4a8fb612d1164501030588f22a62;p=helm.git diff --git a/helm/ocaml/getter/http_getter_map.ml b/helm/ocaml/getter/http_getter_map.ml index e3a4ab2fc..4bead0c6c 100644 --- a/helm/ocaml/getter/http_getter_map.ml +++ b/helm/ocaml/getter/http_getter_map.ml @@ -26,8 +26,7 @@ * http://helm.cs.unibo.it/ *) -exception Key_already_in of string;; -exception Key_not_found of string;; +open Http_getter_types class map dbname = let perm = 420 in (* permission 644 in decimal notation *) @@ -56,19 +55,19 @@ class map dbname = method add key value = self#doWriter (lazy ( try - Dbm.add db (self#normalize_key key) value + Dbm.add db key value with Dbm.Dbm_error "Entry already exists" -> raise (Key_already_in key) )) method replace key value = self#doWriter (lazy ( - Dbm.replace db (self#normalize_key key) value + Dbm.replace db key value )) method remove key = self#doWriter (lazy ( try - Dbm.remove db (self#normalize_key key) + Dbm.remove db key with Dbm.Dbm_error "dbm_delete" -> raise (Key_not_found key) ))