Show caught exception message in findAdv

This commit is contained in:
Yuriy Skalko 2021-01-04 15:41:53 +02:00
parent 4e92c34200
commit e8099942c7

View File

@ -4115,9 +4115,8 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt)
match_len = findForwardAdv(cur, matchAdv);
else
match_len = findBackwardsAdv(cur, matchAdv);
} catch (...) {
// This may only be raised by lyx::regex()
bv->message(_("Invalid regular expression!"));
} catch (exception & ex) {
bv->message(from_ascii(ex.what()));
return false;
}