Locale_wrapper: make the bad_cast catch more clear and fix the std::exception message
This commit is contained in:
@@ -113,11 +113,11 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
|
||||
return r;
|
||||
return msgid;
|
||||
}
|
||||
catch(std::bad_cast const &e) { /* std::bad_cast if std::has_facet<Facet>(loc) == false */
|
||||
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";
|
||||
return msgid;
|
||||
}
|
||||
catch(std::exception const &) {
|
||||
catch(std::exception const &e) {
|
||||
// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
|
||||
return msgid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user