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
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 ->
None, "NCicUnification uncertain: " ^ Lazy.force msg
| DisambiguateChoices.Choice_not_found msg ->
None, ("Disambiguation choice not found: " ^ Lazy.force msg)
+ | DisambiguateTypes.Invalid_choice msg ->
+ None, ("Invalid choice: " ^ snd (Lazy.force msg))
| MatitaEngine.EnrichedWithStatus (exn,_) ->
None, snd(to_string exn)
| NTacStatus.Error (msg,None) ->
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))