From 7086a3fb5a66600c61ea7f51c62af40f0f982abc Mon Sep 17 00:00:00 2001 From: "lane.wei" Date: Fri, 28 Oct 2022 22:18:40 +0800 Subject: [PATCH] ENH: add some logs for appconfig::save exception Change-Id: Ic65345af7debdb340fce5dd03fe09257d7c2c395 --- src/libslic3r/AppConfig.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index e2d8b7e6e4..9340ba784d 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -533,8 +533,10 @@ void AppConfig::save() { // Returns "undefined" if the thread naming functionality is not supported by the operating system. std::optional current_thread_name = get_current_thread_name(); - if (current_thread_name && *current_thread_name != "bambustu_main") - throw CriticalException("Calling AppConfig::save() from a worker thread!"); + if (current_thread_name && *current_thread_name != "bambustu_main") { + BOOST_LOG_TRIVIAL(error) << __FUNCTION__<<", current_thread_name is " << *current_thread_name; + throw CriticalException("Calling AppConfig::save() from a worker thread, thread name: " + *current_thread_name); + } } // The config is first written to a file with a PID suffix and then moved