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:
Diffstat (limited to 'intern/locale/boost_locale_wrapper.cpp')
-rw-r--r--intern/locale/boost_locale_wrapper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 73433fe7c5e..ede9377b38f 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -117,6 +117,13 @@ void bl_locale_set(const char *locale)
#undef LOCALE_INFO
}
+ // Extra catch on `std::runtime_error` is needed for macOS/Clang as it seems that exceptions
+ // like `boost::locale::conv::conversion_error` (which inherit from `std::runtime_error`) are
+ // not caught by their ancestor `std::exception`. See
+ // https://developer.blender.org/T88877#1177108 .
+ catch (std::runtime_error const &e) {
+ std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n";
+ }
catch (std::exception const &e) {
std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n";
}