 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
11 #ifndef _RD_EXCEPTIONS_H
12 #define _RD_EXCEPTIONS_H
22 : std::runtime_error(
"IndexErrorException"), _idx(i){};
23 int index()
const {
return _idx; };
25 const char*
what() const noexcept
override {
26 std::string msg{
"Index Error: "};
27 msg.append(std::to_string(_idx));
43 : std::runtime_error(
"ValueErrorException"), _value(i){};
45 : std::runtime_error(
"ValueErrorException"), _value(msg){};
46 const char*
what() const noexcept
override {
return _value.c_str(); };
60 : std::runtime_error(
"KeyErrorException"), _key(
key){};
61 std::string
key()
const {
return _key; };
63 const char*
what() const noexcept
override {
64 std::string msg{
"Key Error: "};
const char * message() const noexcept
~ValueErrorException() noexcept
Class to allow us to throw a KeyError from C++ and have it make it back to Python.
const char * what() const noexcept override
Class to allow us to throw a ValueError from C++ and have it make it back to Python.
const char * what() const noexcept override
Class to allow us to throw an IndexError from C++ and have it make it back to Python.
const char * what() const noexcept override
~IndexErrorException() noexcept
IndexErrorException(int i)
ValueErrorException(const char *msg)
~KeyErrorException() noexcept
KeyErrorException(std::string key)
ValueErrorException(const std::string &i)