mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH: add some logs for appconfig::save exception
Change-Id: Ic65345af7debdb340fce5dd03fe09257d7c2c395
This commit is contained in:
parent
28cf2d56e2
commit
7086a3fb5a
1 changed files with 4 additions and 2 deletions
|
@ -533,8 +533,10 @@ void AppConfig::save()
|
|||
{
|
||||
// Returns "undefined" if the thread naming functionality is not supported by the operating system.
|
||||
std::optional<std::string> 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue