From b49bfadd87795d217af9a682ea79f2b4d8a40575 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Tue, 24 Jul 2018 15:27:31 +0200 Subject: [PATCH] PresetUpdater: Fail harder on bundle version not present in index --- lib/Slic3r/GUI.pm | 4 ++-- xs/src/slic3r/Utils/PresetUpdater.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 0b9596261..483fd36f9 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -145,8 +145,8 @@ sub OnInit { } }; if ($@) { - warn $@ . "\n"; - fatal_error(undef, $@); + show_error(undef, $@); + $self->{mainframe}->Close; } }); diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index c962a2c82..6e23ab421 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -322,8 +322,9 @@ Updates PresetUpdater::priv::get_config_updates() const const auto ver_current = idx.find(vp.config_version); if (ver_current == idx.end()) { - BOOST_LOG_TRIVIAL(error) << boost::format("Preset bundle (`%1%`) version not found in index: %2%") % idx.vendor() % vp.config_version.to_string(); - continue; + auto message = (boost::format("Preset bundle `%1%` version not found in index: %2%") % idx.vendor() % vp.config_version.to_string()).str(); + BOOST_LOG_TRIVIAL(error) << message; + throw std::runtime_error(message); } // Getting a recommended version from the latest index, wich may have been downloaded