Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-10-23 15:34:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-10-23 15:36:05 +0300
commitf22385f28ec8b855f4ed84e94aa207986db6a09e (patch)
tree09b7251e3346859e28c90c98c4d3780f74853a9c /intern/locale/boost_locale_wrapper.cpp
parent1ab08a2dff57f498bbda2732c59f6e82512a3071 (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.
Diffstat (limited to 'intern/locale/boost_locale_wrapper.cpp')
-rw-r--r--intern/locale/boost_locale_wrapper.cpp12
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..058b6e9f5d9 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(" << msgctxt << ", " << 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;
}