diff options
| author | ppedrot | 2013-01-28 13:54:13 +0000 |
|---|---|---|
| committer | ppedrot | 2013-01-28 13:54:13 +0000 |
| commit | d73bf48c107e7f3e08f2fc5777bbbd42b4e1bc7c (patch) | |
| tree | ef18d6e605c3f98392a226a2d3df68a1d0b0481c /toplevel | |
| parent | 8d77cb907a3595c90f15e1aa6402868ad4e43242 (diff) | |
Added backtrace information to anomalies
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16161 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
| -rw-r--r-- | toplevel/coqinit.ml | 4 | ||||
| -rw-r--r-- | toplevel/mltop.ml | 3 | ||||
| -rw-r--r-- | toplevel/obligations.ml | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/toplevel/coqinit.ml b/toplevel/coqinit.ml index 59d73e7bd8..b4d0bc4134 100644 --- a/toplevel/coqinit.ml +++ b/toplevel/coqinit.ml @@ -11,7 +11,9 @@ open Pp let (/) = Filename.concat -let set_debug () = Flags.debug := true +let set_debug () = + let () = Printexc.record_backtrace true in + Flags.debug := true (* Loading of the ressource file. rcfile is either $XDG_CONFIG_HOME/.coqrc.VERSION, or $XDG_CONFIG_HOME/.coqrc if the first one diff --git a/toplevel/mltop.ml b/toplevel/mltop.ml index cf5f644652..4ac6adc354 100644 --- a/toplevel/mltop.ml +++ b/toplevel/mltop.ml @@ -117,7 +117,8 @@ let dir_ml_load s = | WithTop t -> (try t.load_obj s with - | (UserError _ | Failure _ | Anomaly _ | Not_found as u) -> raise u + | (UserError _ | Failure _ | Not_found as u) -> raise u + | u when Errors.is_anomaly u -> raise u | exc -> let msg = report_on_load_obj_error exc in errorlabstrm "Mltop.load_object" (str"Cannot link ml-object " ++ diff --git a/toplevel/obligations.ml b/toplevel/obligations.ml index fd51564531..03bad4c1c5 100644 --- a/toplevel/obligations.ml +++ b/toplevel/obligations.ml @@ -823,7 +823,7 @@ and solve_obligation_by_tac prg obls i tac = | Loc.Exc_located(_, Refiner.FailError (_, s)) | Refiner.FailError (_, s) -> user_err_loc (fst obl.obl_location, "solve_obligation", Lazy.force s) - | Errors.Anomaly _ as e -> raise e + | e when Errors.is_anomaly e -> raise e | e -> false and solve_prg_obligations prg ?oblset tac = |
