feat(frontends/lean/elaborator): better error localization when running out of stack space and/or memory in begin-end tactic mode.

This commit is contained in:
Leonardo de Moura 2015-05-26 20:09:15 -07:00
parent c4ec89ae6d
commit 4d1b711247

View file

@ -1847,6 +1847,15 @@ bool elaborator::try_using_begin_end(substitution & subst, expr const & mvar, pr
} catch (tactic_exception & ex) {
display_tactic_exception(ex, ps, ptac);
return false;
} catch (exception &) {
throw;
} catch (throwable & ex) {
auto out = regular(env(), ios());
flycheck_error err(out);
display_error_pos(out, pip(), ptac);
out << ex.what() << "\nproof state:\n";
out << ps.pp(env(), ios()) << "\n";
return false;
}
} else {
return false;