mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
WIP Refactoring of exceptions:
1) All slicer's exceptions are now derived from Slic3r::Exception. 2) New exceptions are defined for slicing errors. 3) Exceptions are propagated to the Plater to show. It remains to modify the slicing back-end to throw the new SlicingError exceptions instead of std::runtime_error and to show the other exceptions by a message dialog instead of a notification.
This commit is contained in:
parent
6ac1935932
commit
067cde85f1
59 changed files with 356 additions and 249 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "BoundingBox.hpp"
|
||||
#include "ClipperUtils.hpp"
|
||||
#include "Exception.hpp"
|
||||
#include "Polygon.hpp"
|
||||
#include "Polyline.hpp"
|
||||
|
||||
|
@ -16,7 +17,7 @@ Polyline Polygon::split_at_vertex(const Point &point) const
|
|||
for (const Point &pt : this->points)
|
||||
if (pt == point)
|
||||
return this->split_at_index(int(&pt - &this->points.front()));
|
||||
throw std::invalid_argument("Point not found");
|
||||
throw Slic3r::InvalidArgument("Point not found");
|
||||
return Polyline();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue