mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 15:48:57 +08:00
Provide an alternate use for confess_at to call Slic3r::Log instead of perl xs.
This commit is contained in:
parent
dc256eb989
commit
9a38d96dd4
@ -4,6 +4,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
#include <xsinit.h>
|
#include "utils.hpp"
|
||||||
#include "utils.hpp"
|
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
#ifndef NO_PERL
|
||||||
|
#include <xsinit.h>
|
||||||
|
#else
|
||||||
|
#include "Log.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <cstdarg>
|
||||||
|
|
||||||
void
|
void
|
||||||
confess_at(const char *file, int line, const char *func,
|
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);
|
call_pv("Carp::confess", G_DISCARD);
|
||||||
FREETMPS;
|
FREETMPS;
|
||||||
LEAVE;
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user