mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 19:57:55 -06:00
Implement exception rethrow for ui jobs
This commit is contained in:
parent
264ce71e94
commit
56e7d83513
11 changed files with 112 additions and 51 deletions
17
src/slic3r/GUI/Jobs/PlaterJob.cpp
Normal file
17
src/slic3r/GUI/Jobs/PlaterJob.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "PlaterJob.hpp"
|
||||
#include "slic3r/GUI/GUI.hpp"
|
||||
#include "slic3r/GUI/Plater.hpp"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
void PlaterJob::on_exception(const std::exception_ptr &eptr)
|
||||
{
|
||||
try {
|
||||
if (eptr)
|
||||
std::rethrow_exception(eptr);
|
||||
} catch (std::exception &e) {
|
||||
show_error(m_plater, _(L("An unexpected error occured: ")) + e.what());
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::GUI
|
Loading…
Add table
Add a link
Reference in a new issue