11 #ifndef _RD_EXCEPTIONS_H 12 #define _RD_EXCEPTIONS_H 22 :
std::runtime_error(
"IndexErrorException"), _idx(i){};
23 int index()
const {
return _idx; };
36 :
std::runtime_error(
"ValueErrorException"), _value(i){};
38 :
std::runtime_error(
"ValueErrorException"), _value(msg){};
39 std::string
message()
const {
return _value; };
52 :
std::runtime_error(
"KeyErrorException"), _key(key){};
53 std::string
key()
const {
return _key; };
KeyErrorException(std::string key)
std::string message() const
Class to allow us to throw an IndexError from C++ and have it make it back to Python.
ValueErrorException(const std::string &i)
Class to allow us to throw a ValueError from C++ and have it make it back to Python.
IndexErrorException(int i)
ValueErrorException(const char *msg)
Class to allow us to throw a KeyError from C++ and have it make it back to Python.