]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/urimanager/uriManager.ml
Initial revision
[helm.git] / helm / ocaml / urimanager / uriManager.ml
index 0fa24cfcdc8504bffff1a0be2bb8099507403e8c..f45e65bf30e921e3605bbf3f415e0bc8536c6010 100644 (file)
@@ -96,7 +96,11 @@ let mk_prefixes str =
  in
   let tokens = (Str.split (Str.regexp "/") str) in
    (* ty = "cic:" *)
-   let (ty, sp) = (List.hd tokens, List.tl tokens) in
+   let (ty, sp) =
+    (try (List.hd tokens, List.tl tokens)
+     with Failure "hd" | Failure "tl" ->
+      raise (IllFormedUri str))
+    in
     aux ty sp
 ;;