mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 19:35:57 +08:00
Seq arrange better exception handling
This commit is contained in:
parent
243101f20f
commit
e93caf1a92
@ -28,7 +28,6 @@ using namespace Slic3r;
|
|||||||
namespace Sequential
|
namespace Sequential
|
||||||
{
|
{
|
||||||
class ObjectTooLargeException : public std::runtime_error { public: explicit ObjectTooLargeException(const std::string& msg) : std::runtime_error(msg) {}};
|
class ObjectTooLargeException : public std::runtime_error { public: explicit ObjectTooLargeException(const std::string& msg) : std::runtime_error(msg) {}};
|
||||||
class InternalErrorException : public std::runtime_error { public: explicit InternalErrorException(const std::string& msg) : std::runtime_error(msg) {} };
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ void prepare_ExtruderPolygons(const SolverConfiguration &solver
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw InternalErrorException("MISMATCH BETWEEN OBJECT AND PRINTER SLICE HEIGHTS.");
|
throw std::runtime_error("MISMATCH BETWEEN OBJECT AND PRINTER SLICE HEIGHTS.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,11 @@ void SeqArrangeJob::process(Ctl& ctl)
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
} catch (const SeqArrangeJobException&) {
|
} catch (const SeqArrangeJobException&) {
|
||||||
// The task was canceled. Just make sure that the progress notification disappears.
|
ctl.update_status(100, ""); // Hide progress notification.
|
||||||
ctl.update_status(100, "");
|
}
|
||||||
|
catch (const std::exception&) {
|
||||||
|
ctl.update_status(100, ""); // Hide progress notification.
|
||||||
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +63,7 @@ void SeqArrangeJob::finalize(bool canceled, std::exception_ptr& eptr)
|
|||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
error = true;
|
error = true;
|
||||||
eptr = nullptr; // The exception is handled.
|
eptr = nullptr; // The exception is handled.
|
||||||
} catch (const Sequential::InternalErrorException& ex) {
|
} catch (const std::runtime_error& ex) {
|
||||||
ErrorDialog dlg(wxGetApp().plater(), GUI::format_wxstr(_L("Internal error: %1%"), ex.what()), false);
|
ErrorDialog dlg(wxGetApp().plater(), GUI::format_wxstr(_L("Internal error: %1%"), ex.what()), false);
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
error = true;
|
error = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user