X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2FmatitaExcPp.ml;h=5117b091f9687eef053fe9181bf3476e023e112a;hb=19a25bf176255055193372554437729a6fa1894c;hp=5134f403964195b9739ba6d22b4afa42dee1188f;hpb=f4665bcba9c87ecced8746f08da717c767b1a839;p=helm.git diff --git a/matita/matita/matitaExcPp.ml b/matita/matita/matitaExcPp.ml index 5134f4039..5117b091f 100644 --- a/matita/matita/matitaExcPp.ml +++ b/matita/matita/matitaExcPp.ml @@ -112,8 +112,9 @@ let compact_disambiguation_errors all_passes errorll = choices ;; -let rec to_string = - function +let rec to_string exn = + try + (match exn with HExtlib.Localized (floc,exn) -> let _,msg = to_string exn in let (x, y) = HExtlib.loc_of_floc floc in @@ -139,6 +140,8 @@ let rec to_string = None, "NRefiner uncertain: " ^ snd (Lazy.force msg) | NCicMetaSubst.Uncertain msg -> None, "NCicMetaSubst uncertain: " ^ Lazy.force msg + | NCicMetaSubst.MetaSubstFailure msg -> + None, "NCicMetaSubst failure: " ^ Lazy.force msg | NCicTypeChecker.TypeCheckerFailure msg -> None, "NTypeChecker failure: " ^ Lazy.force msg | NCicTypeChecker.AssertFailure msg -> @@ -236,5 +239,7 @@ let rec to_string = loc, "********** DISAMBIGUATION ERRORS: **********\n" ^ explain (aux errorll) - | exn -> None, "Uncaught exception: " ^ Printexc.to_string exn - + | exn -> None, ("Uncaught exception: " ^ Printexc.to_string exn ^ Printexc.get_backtrace ())) + with exn -> + None, ("Exception raised during pretty-printing of an exception: " ^ + snd (to_string exn))