mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 20:10:36 +08:00
Log otherwise uncaught exceptions so we have an idea where it came from.
This commit is contained in:
parent
f14f34294f
commit
bf57b74d9e
@ -209,4 +209,11 @@ void App::CallAfter(std::function<void()> cb_function) {
|
||||
this->callback_register.unlock();
|
||||
}
|
||||
|
||||
void App::OnUnhandledException() {
|
||||
try { throw; }
|
||||
catch (std::exception &e) {
|
||||
Slic3r::Log::fatal_error(LogChannel, LOG_WSTRING("Exception Caught: " << e.what()));
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
void CallAfter(std::function<void()> cb_function);
|
||||
|
||||
|
||||
void OnUnhandledException() override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<Settings> gui_config; // GUI-specific configuration options
|
||||
|
Loading…
x
Reference in New Issue
Block a user