diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index 6806f4f540b..674410388da 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -464,7 +464,7 @@ bool ConfigBase::set_deserialize_nothrow(const t_config_option_key &opt_key_src, void ConfigBase::set_deserialize(const t_config_option_key &opt_key_src, const std::string &value_src, bool append) { if (! this->set_deserialize_nothrow(opt_key_src, value_src, append)) - throw BadOptionTypeException("ConfigBase::set_deserialize() failed"); + throw BadOptionTypeException((boost::format("ConfigBase::set_deserialize() failed for parameter \"%1%\", value \"%2%\"") % opt_key_src % value_src).str()); } void ConfigBase::set_deserialize(std::initializer_list items) diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp index f02caf226cb..87e02089860 100644 --- a/src/libslic3r/Config.hpp +++ b/src/libslic3r/Config.hpp @@ -56,10 +56,9 @@ class NoDefinitionException : public std::runtime_error class BadOptionTypeException : public std::runtime_error { public: - BadOptionTypeException() : - std::runtime_error("Bad option type exception") {} - BadOptionTypeException(const char* message) : - std::runtime_error(message) {} + BadOptionTypeException() : std::runtime_error("Bad option type exception") {} + BadOptionTypeException(const std::string &message) : std::runtime_error(message) {} + BadOptionTypeException(const char* message) : std::runtime_error(message) {} }; // Type of a configuration value.