[Bf-blender-cvs] [3ca606f] master: Locale_wrapper: make the bad_cast catch more clear and fix the std::exception message

Jens Verwiebe noreply at git.blender.org
Wed Feb 26 17:33:52 CET 2014


Commit: 3ca606ffc3a6ab94964a8891fb348ca12bf2daa9
Author: Jens Verwiebe
Date:   Wed Feb 26 17:33:26 2014 +0100
https://developer.blender.org/rB3ca606ffc3a6ab94964a8891fb348ca12bf2daa9

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

===================================================================

M	intern/locale/boost_locale_wrapper.cpp

===================================================================

diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 00371fb..c032243 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -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;
 	}




More information about the Bf-blender-cvs mailing list