11#ifndef _RD_EXCEPTIONS_H
12#define _RD_EXCEPTIONS_H
24 : std::runtime_error(
"IndexErrorException"),
26 _msg(
"Index Error: " + std::to_string(_idx)) {}
27 int index()
const {
return _idx; }
29 const char *
what() const noexcept
override {
return _msg.c_str(); }
44 : std::runtime_error(
"ValueErrorException"), _value(std::move(i)) {}
46 : std::runtime_error(
"ValueErrorException"), _value(msg) {}
47 const char *
what() const noexcept
override {
return _value.c_str(); }
60 : std::runtime_error(
"KeyErrorException"),
62 _msg(
"Key Error: " +
key) {}
64 : std::runtime_error(
"KeyErrorException"),
66 _msg(
"Key Error: " + _key) {}
67 std::string
key()
const {
return _key; }
69 const char *
what() const noexcept
override {
return _msg.c_str(); }
const char * what() const noexcept override
IndexErrorException(int i)
~IndexErrorException() noexcept override=default
KeyErrorException(std::string_view key)
const char * what() const noexcept override
~KeyErrorException() noexcept override=default
KeyErrorException(std::string key)
ValueErrorException(const char *msg)
~ValueErrorException() noexcept override=default
const char * what() const noexcept override
ValueErrorException(std::string i)
#define RDKIT_RDGENERAL_EXPORT