From 420ac69e5b24faf3ae09fc6f9abc306d5154b9da Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Fri, 31 Oct 2025 09:00:22 +0800 Subject: [PATCH] Log error when image resource not found --- src/slic3r/GUI/wxExtensions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 23ed10c7d6..1a6037184d 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -5,6 +5,7 @@ #include #include +#include #include "GUI.hpp" #include "GUI_App.hpp" @@ -463,6 +464,7 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in, if (bmp == nullptr) { // 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); } @@ -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); if (bmp == nullptr) { // No SVG found + BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << "Could not load bitmap: " << bmp_name; throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name); } return *bmp;