1#ifndef VIENNASHE_MODELS_MARKOVCHAIN_EXCEPTION_HPP
2#define VIENNASHE_MODELS_MARKOVCHAIN_EXCEPTION_HPP
36 : std::runtime_error(str), msg_(
""), index_(0), msgcache_(
"") { }
38 virtual const char*
what()
const throw() {
return this->msgcache_.c_str(); }
41 : std::runtime_error(msg), msg_(msg), index_(index)
42 { this->fill_message(); }
51 ss <<
"* Models: invalid state '" << index_ <<
"' does not exist or is malconfigured, i.e. state.occupancy() > 1.0 or state.occupancy() < 0 !";
52 ss <<
" Message: '" << msg_ <<
"'";
53 this->msgcache_ = ss.str();
58 std::string msgcache_;
Thrown whenever a markov chain model finds an invalid or non-existing state.
invalid_state_exception(std::string const &str)
invalid_state_exception(std::string msg, std::size_t index)
virtual ~invalid_state_exception()
virtual const char * what() const
Contains exceptions for viennashe::models.
The main ViennaSHE namespace. All functionality resides inside this namespace.