9 #ifndef ALPS_PARAMS_DICT_EXCEPTIONS_HPP_046b246d331b4e54bedf6bfef6e54a71 10 #define ALPS_PARAMS_DICT_EXCEPTIONS_HPP_046b246d331b4e54bedf6bfef6e54a71 19 mutable std::string what_;
22 :
std::runtime_error(a_reason),
23 name_(a_name), what_(a_reason)
26 std::string
name()
const {
return name_; }
29 virtual const char*
what()
const throw() {
30 const std::string key(name_.empty() ? std::string(
"Unknown_key") : (
"Key '"+name_+
"'"));
31 what_=key+
": "+std::runtime_error::what();
void set_name(const std::string &name)
uninitialized_value(const std::string &a_name, const std::string &a_reason)
double_definition(const std::string &a_name, const std::string &a_reason)
Exception for type mismatch.
Exception for using uninitialized value.
virtual const char * what() const
value_mismatch(const std::string &a_name, const std::string &a_reason)
type_mismatch(const std::string &a_name, const std::string &a_reason)
Exception for value mismatch.
General exception (base class)
exception_base(const std::string &a_name, const std::string &a_reason)