X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fgetter%2Fconfiguration.ml;h=1eb4ab65e6f55adcf014e50e2e5e7519a265521e;hb=2a825bacd5664c01ae56ed1255390a5972d1e8b9;hp=d5fd0e40f5c29647bdf83a97a42eb61eca706d78;hpb=9543a355016ed3c2abc5e75e4e5d24e8f4d9bb3a;p=helm.git diff --git a/helm/ocaml/getter/configuration.ml b/helm/ocaml/getter/configuration.ml index d5fd0e40f..1eb4ab65e 100644 --- a/helm/ocaml/getter/configuration.ml +++ b/helm/ocaml/getter/configuration.ml @@ -34,14 +34,22 @@ class warner = ;; let xml_document () = + let error e = + prerr_endline ("Warning: configuration file not found, or incorrect: " ^ + Pxp_types.string_of_exn e) ; + None + in let module Y = Pxp_yacc in try let config = {Y.default_config with Y.warner = new warner} in Some (Y.parse_document_entity config (Y.from_file filename) Y.default_spec) with - e -> - prerr_endline ("Warning: configuration file not found, or incorrect: " ^ Pxp_types.string_of_exn e) ; - None + | (Pxp_types.Error _) as e -> error e + | (Pxp_types.At _) as e -> error e + | (Pxp_types.Validation_error _) as e -> error e + | (Pxp_types.WF_error _) as e -> error e + | (Pxp_types.Namespace_error _) as e -> error e + | (Pxp_types.Character_not_supported) as e -> error e ;; exception Impossible;;