mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Partial fix of v2.2.0 alpha2 Unhandled exception - extrusion width #3482
Exceptions thrown by Flow calculation were made explicit classes derived from std::invalid_argument. The PresetHints::recommended_thin_wall_thickness() newly catches these exceptions and it shows the reason of why the hint is invalid.
This commit is contained in:
parent
d1e3435956
commit
43f2171446
3 changed files with 45 additions and 10 deletions
|
@ -27,6 +27,31 @@ enum FlowRole {
|
|||
frSupportMaterialInterface,
|
||||
};
|
||||
|
||||
class FlowError : public std::invalid_argument
|
||||
{
|
||||
public:
|
||||
FlowError(const std::string& what_arg) : invalid_argument(what_arg) {}
|
||||
FlowError(const char* what_arg) : invalid_argument(what_arg) {}
|
||||
};
|
||||
|
||||
class FlowErrorNegativeSpacing : public FlowError
|
||||
{
|
||||
public:
|
||||
FlowErrorNegativeSpacing();
|
||||
};
|
||||
|
||||
class FlowErrorNegativeFlow : public FlowError
|
||||
{
|
||||
public:
|
||||
FlowErrorNegativeFlow();
|
||||
};
|
||||
|
||||
class FlowErrorMissingVariable : public FlowError
|
||||
{
|
||||
public:
|
||||
FlowErrorMissingVariable(const std::string& what_arg) : FlowError(what_arg) {}
|
||||
};
|
||||
|
||||
class Flow
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue