mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
Let's hope that the std::exception::what() returns either a 7-bit
string or an UTF-8 string. Let's convert it to wxString before showing an error message box. boost::system shall return UTF-8 localized error messages as long as we set -DBOOST_SYSTEM_USE_UTF8 in the top most CMakeFiles.txt, which we do.
This commit is contained in:
@@ -608,7 +608,7 @@ static void generic_exception_handle()
|
|||||||
std::terminate();
|
std::terminate();
|
||||||
throw;
|
throw;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
wxLogError("Internal error: %s", ex.what());
|
wxLogError("Internal error: %s", wxString::FromUTF8(ex.what()));
|
||||||
BOOST_LOG_TRIVIAL(error) << boost::format("Uncaught exception: %1%") % ex.what();
|
BOOST_LOG_TRIVIAL(error) << boost::format("Uncaught exception: %1%") % ex.what();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user