mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Log error when image resource not found
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
@@ -463,6 +464,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) << __FUNCTION__ << "Could not load bitmap: " << bmp_name;
|
||||||
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -482,6 +484,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) << __FUNCTION__ << "Could not load bitmap: " << bmp_name;
|
||||||
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
|
||||||
}
|
}
|
||||||
return *bmp;
|
return *bmp;
|
||||||
|
|||||||
Reference in New Issue
Block a user