FIX: add stacktrace to find out the caller
jira: [none] Change-Id: I28cd54b0e0c5d8cafb2257b775b60f6b05a42fc2
This commit is contained in:
parent
5fe05ffb53
commit
93591aea12
|
@ -7,6 +7,15 @@
|
||||||
|
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
|
|
||||||
|
/* mac need the macro while including <boost/stacktrace.hpp>*/
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/stacktrace.hpp>
|
||||||
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
|
@ -462,6 +471,7 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in,
|
||||||
|
|
||||||
if (bmp == nullptr) {
|
if (bmp == nullptr) {
|
||||||
// Neither SVG nor PNG has been found, raise error
|
// Neither SVG nor PNG has been found, raise error
|
||||||
|
BOOST_LOG_TRIVIAL(error) << "Could not load bitmap: " << boost::stacktrace::stacktrace();
|
||||||
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,6 +491,7 @@ wxBitmap create_scaled_bitmap2(const std::string& bmp_name_in, Slic3r::GUI::Bitm
|
||||||
wxBitmap* bmp = cache.load_svg2(bmp_name, width, height, grayscale, false, array_new_color, resize ? em_unit(win) * 0.1f : 0.f);
|
wxBitmap* bmp = cache.load_svg2(bmp_name, width, height, grayscale, false, array_new_color, resize ? em_unit(win) * 0.1f : 0.f);
|
||||||
if (bmp == nullptr) {
|
if (bmp == nullptr) {
|
||||||
// No SVG found
|
// No SVG found
|
||||||
|
BOOST_LOG_TRIVIAL(error) << "Could not load bitmap: " << boost::stacktrace::stacktrace();
|
||||||
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
||||||
}
|
}
|
||||||
return *bmp;
|
return *bmp;
|
||||||
|
|
Loading…
Reference in New Issue