Merge branch 'vk-bugfixes'

This commit is contained in:
Vojtech Kral 2019-08-27 10:37:42 +02:00
commit 979f66a73b
6 changed files with 40 additions and 46 deletions

View file

@ -204,18 +204,6 @@ AvrDude::Ptr AvrDude::run()
message_fn("\n", 1);
}
if (self->p->complete_fn) {
self->p->complete_fn();
}
} catch (...) {
self->p->exit_code = EXIT_EXCEPTION;
static const char *msg = "An unkown exception was thrown in the background thread.\n";
if (self->p->message_fn) {
self->p->message_fn(msg, sizeof(msg));
}
if (self->p->complete_fn) {
self->p->complete_fn();
}

View file

@ -1,4 +1,7 @@
option(SLIC3R_ENC_CHECK "Verify encoding of source files" 1)
if (SLIC3R_ENC_CHECK)
add_executable(encoding-check encoding-check.cpp)
# A global no-op target which depends on all encodings checks,
@ -10,11 +13,13 @@ add_custom_target(global-encoding-check
ALL
DEPENDS encoding-check
)
endif()
# Function that adds source file encoding check to a target
# using the above encoding-check binary
function(encoding_check TARGET)
if (SLIC3R_ENC_CHECK)
# Obtain target source files
get_target_property(T_SOURCES ${TARGET} SOURCES)
@ -36,4 +41,5 @@ function(encoding_check TARGET)
# via the global-encoding-check
add_dependencies(global-encoding-check encoding-check-${TARGET})
add_dependencies(${TARGET} global-encoding-check)
endif()
endfunction()

View file

@ -139,9 +139,6 @@ static void generic_exception_handle()
wxLogError("Internal error: %s", ex.what());
BOOST_LOG_TRIVIAL(error) << boost::format("Uncaught exception: %1%") % ex.what();
throw;
} catch (...) {
wxLogError("Unknown internal error");
BOOST_LOG_TRIVIAL(error) << "Uncaught exception: Unknown error";
}
}
@ -169,7 +166,7 @@ bool GUI_App::OnInit()
{
try {
return on_init_inner();
} catch (...) {
} catch (const std::exception&) {
generic_exception_handle();
return false;
}

View file

@ -445,6 +445,7 @@ DynamicPrintConfig PresetBundle::full_config() const
DynamicPrintConfig PresetBundle::full_config_secure() const
{
DynamicPrintConfig config = this->full_config();
config.erase("print_host");
config.erase("printhost_apikey");
config.erase("printhost_cafile");
return config;

View file

@ -113,7 +113,9 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector<Update> &updates) :
if (! update.comment.empty()) {
flex->Add(new wxStaticText(this, wxID_ANY, _(L("Comment:"))), 0, wxALIGN_RIGHT);
flex->Add(new wxStaticText(this, wxID_ANY, from_u8(update.comment)));
auto *update_comment = new wxStaticText(this, wxID_ANY, from_u8(update.comment));
update_comment->Wrap(CONTENT_WIDTH * wxGetApp().em_unit());
flex->Add(update_comment);
}
versions->Add(flex);

View file

@ -98,7 +98,7 @@ optional<unsigned long> sysfs_tty_prop_hex(const std::string &tty_dev, const std
if (!prop) { return boost::none; }
try { return std::stoul(*prop, 0, 16); }
catch (...) { return boost::none; }
catch (const std::exception&) { return boost::none; }
}
#endif