diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-24 09:23:14 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-24 09:23:14 +0300 |
commit | 35d7211bfae981c8299345928ab2905c17782ab9 (patch) | |
tree | ca00ef0c6c48f9494ba44e14f028533203cba3ff /intern | |
parent | db69deea898e5952bc8f510fa667c995f484a868 (diff) |
I18n: tweak/fix exception catching code of pgettex() wrapper.
Related to T57066, rather unlikely to fix core of the issue, but may
solve crash itself.
Same as rBf22385f28ec8 (did it by mistake in 2.8 first :/ ).
Diffstat (limited to 'intern')
-rw-r--r-- | intern/locale/boost_locale_wrapper.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp index 0707c0dd3e3..3fd8f146aa3 100644 --- a/intern/locale/boost_locale_wrapper.cpp +++ b/intern/locale/boost_locale_wrapper.cpp @@ -112,13 +112,17 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid) return r; return msgid; } - catch(std::bad_cast const &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */ -// std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n"; + catch(const std::bad_cast &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */ +#ifndef NDEBUG + std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n"; +#endif (void)e; return msgid; } - catch(std::exception const &e) { -// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n"; + catch(const std::exception &e) { +#ifndef NDEBUG + std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n"; +#endif (void)e; return msgid; } |