mirror of https://github.com/djcb/mu.git
xapian-utils: xapian_try: also catch std::exception
This commit is contained in:
parent
673929f169
commit
2fb6356ab6
|
@ -34,6 +34,8 @@ try {
|
|||
g_critical("%s: xapian error '%s'", __func__, xerr.get_msg().c_str());
|
||||
} catch (const std::runtime_error& re) {
|
||||
g_critical("%s: error: %s", __func__, re.what());
|
||||
} catch (const std::exception& e) {
|
||||
g_critical("%s: caught exception: %s", __func__, e.what());
|
||||
} catch (...) {
|
||||
g_critical("%s: caught exception", __func__);
|
||||
}
|
||||
|
@ -49,6 +51,9 @@ try {
|
|||
} catch (const std::runtime_error& re) {
|
||||
g_critical("%s: error: %s", __func__, re.what());
|
||||
return static_cast<Default>(def);
|
||||
} catch (const std::exception& e) {
|
||||
g_critical("%s: caught exception: %s", __func__, e.what());
|
||||
return static_cast<Default>(def);
|
||||
} catch (...) {
|
||||
g_critical("%s: caught exception", __func__);
|
||||
return static_cast<Default>(def);
|
||||
|
|
Loading…
Reference in New Issue