Refactor catch(...) handlers in Http, OctoPrint, PrintHost, and Serial

This commit is contained in:
Vojtech Kral 2019-08-19 10:55:11 +02:00
parent baaf66d138
commit f937209619
4 changed files with 9 additions and 11 deletions

View file

@ -2,6 +2,7 @@
#include <algorithm>
#include <sstream>
#include <exception>
#include <boost/format.hpp>
#include <boost/log/trivial.hpp>
#include <boost/property_tree/ptree.hpp>
@ -69,7 +70,7 @@ bool OctoPrint::test(wxString &msg) const
msg = wxString::Format(_(L("Mismatched type of print host: %s")), text ? *text : "OctoPrint");
}
}
catch (...) {
catch (const std::exception &) {
res = false;
msg = "Could not parse server response";
}