diff --git a/xs/src/libslic3r/Log.hpp b/xs/src/libslic3r/Log.hpp index f105dac0d..70e8616fc 100644 --- a/xs/src/libslic3r/Log.hpp +++ b/xs/src/libslic3r/Log.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace Slic3r { diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index 4c20f7654..4275f06f8 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -1,6 +1,12 @@ -#include -#include "utils.hpp" +#include "utils.hpp" #include +#ifndef NO_PERL +#include +#else +#include "Log.hpp" +#endif + +#include void confess_at(const char *file, int line, const char *func, @@ -26,6 +32,12 @@ confess_at(const char *file, int line, const char *func, call_pv("Carp::confess", G_DISCARD); FREETMPS; LEAVE; + #else + std::stringstream ss; + ss << "Error in function " << func << " at " << file << ":" << line << ": "; + ss << pat << "\n"; + + Slic3r::Log::error(std::string("Libslic3r"), ss.str() ); #endif }