10 #ifndef _RD_EXCEPTIONS_H 11 #define _RD_EXCEPTIONS_H 21 :
std::runtime_error(
"IndexErrorException"), _idx(i){};
22 int index()
const {
return _idx; };
35 :
std::runtime_error(
"ValueErrorException"), _value(i){};
37 :
std::runtime_error(
"ValueErrorException"), _value(msg){};
38 std::string
message()
const {
return _value; };
51 :
std::runtime_error(
"KeyErrorException"), _key(key){};
52 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.