Throw an exception if one tries to set a GncOption with an unsupported type.

pull/1191/head
John Ralls 7 years ago
parent c5fac51a8b
commit e51faff3e3

@ -418,6 +418,11 @@ private:
}
template <class OptionType>
void operator()(OptionType& option) const {
std::string msg{"Attempt to set option of type "};
msg += typeid(OptionType).name();
msg += " with value of type ";
msg += typeid(m_value).name();
throw std::invalid_argument(msg);
}
private:
ValueType m_value;

Loading…
Cancel
Save