Locale_wrapper: make the bad_cast catch more clear and fix the std::exception message

This commit is contained in:
Jens Verwiebe
2014-02-26 17:33:26 +01:00
parent a856b123ff
commit 3ca606ffc3

View File

@@ -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;
}