Silence warnings: add cases for hollowing and milling_extruders, catch reference for polymorphic exception

This commit is contained in:
Joseph Lenox 2021-03-19 16:36:59 -05:00
parent d1c307fade
commit 181b1e73dc

View File

@ -52,6 +52,8 @@ std::string toString(OptionCategory opt) {
case padSupp: return "Pad and Support"; case padSupp: return "Pad and Support";
case wipe: return "Wipe Options"; case wipe: return "Wipe Options";
case milling: return "milling"; case milling: return "milling";
case hollowing: return "hollowing";
case milling_extruders: return "milling_extruders";
} }
return "error"; return "error";
} }
@ -457,7 +459,7 @@ void ConfigBase::apply_only(const ConfigBase &other, const t_config_option_keys
} else { } else {
try { try {
my_opt->set(other_opt); my_opt->set(other_opt);
} catch (ConfigurationException e) { } catch (ConfigurationException& e) {
throw ConfigurationException(std::string(e.what()) + ", when ConfigBase::apply_only on " + opt_key); throw ConfigurationException(std::string(e.what()) + ", when ConfigBase::apply_only on " + opt_key);
} }
} }