Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libslic3r/PrintBase.cpp')
-rw-r--r--src/libslic3r/PrintBase.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp
index 81affe04d..fb5e102c1 100644
--- a/src/libslic3r/PrintBase.cpp
+++ b/src/libslic3r/PrintBase.cpp
@@ -1,3 +1,4 @@
+#include "Exception.hpp"
#include "PrintBase.hpp"
#include <boost/filesystem.hpp>
@@ -68,7 +69,7 @@ std::string PrintBase::output_filename(const std::string &format, const std::str
filename = boost::filesystem::change_extension(filename, default_ext);
return filename.string();
} catch (std::runtime_error &err) {
- throw std::runtime_error(L("Failed processing of the output_filename_format template.") + "\n" + err.what());
+ throw Slic3r::PlaceholderParserError(L("Failed processing of the output_filename_format template.") + "\n" + err.what());
}
}
@@ -88,6 +89,14 @@ std::string PrintBase::output_filepath(const std::string &path, const std::strin
return path;
}
+void PrintBase::status_update_warnings(ObjectID object_id, int step, PrintStateBase::WarningLevel /* warning_level */, const std::string &message)
+{
+ if (this->m_status_callback)
+ m_status_callback(SlicingStatus(*this, step));
+ else if (! message.empty())
+ printf("%s warning: %s\n", (object_id == this->id()) ? "print" : "print object", message.c_str());
+}
+
tbb::mutex& PrintObjectBase::state_mutex(PrintBase *print)
{
return print->state_mutex();
@@ -98,4 +107,9 @@ std::function<void()> PrintObjectBase::cancel_callback(PrintBase *print)
return print->cancel_callback();
}
+void PrintObjectBase::status_update_warnings(PrintBase *print, int step, PrintStateBase::WarningLevel warning_level, const std::string &message)
+{
+ print->status_update_warnings(this->id(), step, warning_level, message);
+}
+
} // namespace Slic3r