mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-03 02:22:46 +00:00
Refactored Print::validate() method to not throw an exception, but
to return a string with an error message instead. This was necessary to avoid a hang-up on some Strawberry Perl distributions, when a perl "croak" function is called after a C++ exception is caught.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "libslic3r.h"
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include "BoundingBox.hpp"
|
||||
#include "Flow.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
@@ -29,11 +29,6 @@ enum PrintObjectStep {
|
||||
posInfill, posSupportMaterial,
|
||||
};
|
||||
|
||||
class PrintValidationException : public std::runtime_error {
|
||||
public:
|
||||
PrintValidationException(const std::string &error) : std::runtime_error(error) {};
|
||||
};
|
||||
|
||||
// To be instantiated over PrintStep or PrintObjectStep enums.
|
||||
template <class StepType>
|
||||
class PrintState
|
||||
@@ -203,7 +198,8 @@ class Print
|
||||
bool apply_config(DynamicPrintConfig config);
|
||||
bool has_infinite_skirt() const;
|
||||
bool has_skirt() const;
|
||||
void validate() const;
|
||||
// Returns an empty string if valid, otherwise returns an error message.
|
||||
std::string validate() const;
|
||||
BoundingBox bounding_box() const;
|
||||
BoundingBox total_bounding_box() const;
|
||||
double skirt_first_layer_height() const;
|
||||
|
||||
Reference in New Issue
Block a user