mirror of https://github.com/djcb/mu.git
* mu-util.h: make exceptions create criticals (just like g_return_if_fail & friends)
This commit is contained in:
parent
3fbcac42ab
commit
6efcfb4616
|
@ -77,20 +77,20 @@ gboolean mu_util_check_dir (const gchar* path, gboolean readable,
|
||||||
*/
|
*/
|
||||||
#define MU_XAPIAN_CATCH_BLOCK \
|
#define MU_XAPIAN_CATCH_BLOCK \
|
||||||
catch (const Xapian::Error &err) { \
|
catch (const Xapian::Error &err) { \
|
||||||
g_warning ("%s: caught xapian exception '%s'", \
|
g_critical ("%s: caught xapian exception '%s'", \
|
||||||
__FUNCTION__, err.get_msg().c_str()); \
|
__FUNCTION__, err.get_msg().c_str()); \
|
||||||
} catch (...) { \
|
} catch (...) { \
|
||||||
g_warning ("%s: caught exception", __FUNCTION__); \
|
g_critical ("%s: caught exception", __FUNCTION__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MU_XAPIAN_CATCH_BLOCK_RETURN(R) \
|
#define MU_XAPIAN_CATCH_BLOCK_RETURN(R) \
|
||||||
catch (const Xapian::Error &err) { \
|
catch (const Xapian::Error &err) { \
|
||||||
g_warning ("%s: caught xapian exception '%s'", \
|
g_critical ("%s: caught xapian exception '%s'", \
|
||||||
__FUNCTION__, err.get_msg().c_str()); \
|
__FUNCTION__, err.get_msg().c_str()); \
|
||||||
return (R); \
|
return (R); \
|
||||||
} catch (...) { \
|
} catch (...) { \
|
||||||
g_warning ("%s: caught exception", __FUNCTION__); \
|
g_critical ("%s: caught exception", __FUNCTION__); \
|
||||||
return (R); \
|
return (R); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue