diff --git a/src/frontends/lean/parser_error.cpp b/src/frontends/lean/parser_error.cpp index b031f066a..a848a85b6 100644 --- a/src/frontends/lean/parser_error.cpp +++ b/src/frontends/lean/parser_error.cpp @@ -97,6 +97,14 @@ void parser_imp::display_error(tactic_cmd_error const & ex) { display_proof_state(ex.m_state); } +#define CATCH_CORE(ShowError, ThrowError) \ +m_found_errors = true; \ +if (m_show_errors) { ShowError ; } \ +sync(); \ +if (m_use_exceptions) { ThrowError ; } + +#define CATCH(ShowError) CATCH_CORE(ShowError, throw;) + /** \brief Execute the given function \c f, and handle exceptions occurring when executing \c f. @@ -106,63 +114,29 @@ void parser_imp::protected_call(std::function && f, std::function