1#ifndef VIENNASHE_MODELS_EXCEPTION_HPP
2#define VIENNASHE_MODELS_EXCEPTION_HPP
35 : std::runtime_error(str), msg_(
""), value_(0) { this->fill_message(); }
37 virtual const char*
what()
const throw() {
return this->msgcache_.c_str(); }
40 : std::runtime_error(msg), msg_(msg), value_(value) { this->fill_message(); }
49 ss <<
"* Models: Invalid parameter! '" << msg_ <<
"' Invalid value being: '" << value_ <<
"'";
55 std::string msgcache_;
63 : std::runtime_error(str), msg_(
""), index_(0), bound_(0), msgcache_(
"") { }
65 virtual const char*
what()
const throw() {
return this->msgcache_.c_str(); }
68 : std::runtime_error(msg), msg_(msg), index_(index), bound_(bound)
69 { this->fill_message(); }
78 ss <<
"* Models: index out of bounds! '" << msg_ <<
"' index being: '" << index_ <<
"'" <<
"' bound being: '" << bound_ <<
"'";
79 this->msgcache_ = ss.str();
85 std::string msgcache_;
Thrown whenever a model finds an index to be out of bounds.
index_out_of_bounds_exception(std::string const &str)
index_out_of_bounds_exception(std::string msg, long index, long bound)
virtual ~index_out_of_bounds_exception()
virtual const char * what() const
Thrown whenever an invalid parameter to a model is given.
invalid_parameter_exception(std::string const &str)
invalid_parameter_exception(std::string msg, double value)
virtual ~invalid_parameter_exception()
virtual const char * what() const
Exception for the case that the evaluation of a model fails.
model_evaluation_exception(std::string const &str)
The main ViennaSHE namespace. All functionality resides inside this namespace.