@@ -210,7 +210,7 @@ let emit_try exec catches env =
ctx.debug.caught_exception <- vnull;
restore();
build_exception_stack ctx env;
- eval.env <- env;
+ while eval.env != env do pop_environment ctx eval.env done;
let exec,_,varacc =
try
List.find (fun (_,path,i) -> path = key_Dynamic || is v path) catches
@@ -116,7 +116,6 @@ let build_exception_stack ctx env =
in
let d = loop [] eval.env in
ctx.exception_stack <- List.map (fun env ->
- env.env_debug.timer();
{pfile = rev_hash env.env_info.pfile;pmin = env.env_leave_pmin; pmax = env.env_leave_pmax},env.env_info.kind
) d