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.
This commit is contained in:
parent
1ab08a2dff
commit
f22385f28e
|
@ -112,13 +112,17 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
|
||||||
return r;
|
return r;
|
||||||
return msgid;
|
return msgid;
|
||||||
}
|
}
|
||||||
catch(std::bad_cast const &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */
|
catch(const std::bad_cast &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */
|
||||||
// std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n";
|
#ifndef NDEBUG
|
||||||
|
std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
|
||||||
|
#endif
|
||||||
(void)e;
|
(void)e;
|
||||||
return msgid;
|
return msgid;
|
||||||
}
|
}
|
||||||
catch(std::exception const &e) {
|
catch(const std::exception &e) {
|
||||||
// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
|
#ifndef NDEBUG
|
||||||
|
std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
|
||||||
|
#endif
|
||||||
(void)e;
|
(void)e;
|
||||||
return msgid;
|
return msgid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue