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());
|
g_critical("%s: xapian error '%s'", __func__, xerr.get_msg().c_str());
|
||||||
} catch (const std::runtime_error& re) {
|
} catch (const std::runtime_error& re) {
|
||||||
g_critical("%s: error: %s", __func__, re.what());
|
g_critical("%s: error: %s", __func__, re.what());
|
||||||
|
} catch (const std::exception& e) {
|
||||||
|
g_critical("%s: caught exception: %s", __func__, e.what());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
g_critical("%s: caught exception", __func__);
|
g_critical("%s: caught exception", __func__);
|
||||||
}
|
}
|
||||||
|
@ -49,6 +51,9 @@ try {
|
||||||
} catch (const std::runtime_error& re) {
|
} catch (const std::runtime_error& re) {
|
||||||
g_critical("%s: error: %s", __func__, re.what());
|
g_critical("%s: error: %s", __func__, re.what());
|
||||||
return static_cast<Default>(def);
|
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 (...) {
|
} catch (...) {
|
||||||
g_critical("%s: caught exception", __func__);
|
g_critical("%s: caught exception", __func__);
|
||||||
return static_cast<Default>(def);
|
return static_cast<Default>(def);
|
||||||
|
|
Loading…
Reference in New Issue