From ab2b9e54afe3a66d7283e6205e63dd48a2733b73 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Tue, 22 Apr 2003 10:17:38 +0000 Subject: [PATCH] Improved exception catching. --- helm/ocaml/mathql/mQueryMisc.ml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/helm/ocaml/mathql/mQueryMisc.ml b/helm/ocaml/mathql/mQueryMisc.ml index 311596baa..bb5bb74ae 100644 --- a/helm/ocaml/mathql/mQueryMisc.ml +++ b/helm/ocaml/mathql/mQueryMisc.ml @@ -57,15 +57,20 @@ let cic_textual_parser_uri_of_string uri' = let uri'',typeno = CicTextualLexer.indtyuri_of_uri uri' in CicTextualParser0.IndTyUri (uri'',typeno) with - _ -> - (* Constructor of an Inductive Type *) - let uri'',typeno,consno = - CicTextualLexer.indconuri_of_uri uri' - in - CicTextualParser0.IndConUri (uri'',typeno,consno) + UriManager.IllFormedUri _ + | CicTextualParser0.LexerFailure _ + | Invalid_argument _ -> + (* Constructor of an Inductive Type *) + let uri'',typeno,consno = + CicTextualLexer.indconuri_of_uri uri' + in + CicTextualParser0.IndConUri (uri'',typeno,consno) ) with - _ -> raise (IllFormedUri uri') + UriManager.IllFormedUri _ + | CicTextualParser0.LexerFailure _ + | Invalid_argument _ -> + raise (IllFormedUri uri') ;; let cic_textual_parser_uri_of_string uri' = let res = cic_textual_parser_uri_of_string uri' in -- 2.39.2