feat(library/tactic/inversion_tactic): improve error message for unknown hypothesis
This commit is contained in:
parent
b88b98ac22
commit
aba158dbd4
1 changed files with 4 additions and 1 deletions
|
@ -1037,8 +1037,11 @@ public:
|
||||||
|
|
||||||
optional<result> execute(goal const & g, name const & n, implementation_list const & imps) {
|
optional<result> execute(goal const & g, name const & n, implementation_list const & imps) {
|
||||||
auto p = g.find_hyp(n);
|
auto p = g.find_hyp(n);
|
||||||
if (!p)
|
if (!p) {
|
||||||
|
if (m_throw_tactic_exception)
|
||||||
|
throw tactic_exception(sstream() << "invalid 'cases' tactic, unknown hypothesis '" << n << "'");
|
||||||
return optional<result>();
|
return optional<result>();
|
||||||
|
}
|
||||||
expr const & h = p->first;
|
expr const & h = p->first;
|
||||||
return execute(g, h, imps);
|
return execute(g, h, imps);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue