MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / reserved_word_error

Class reserved_word_error

include/chaiscript/dispatchkit/dispatchkit.hpp:64–83  ·  view source on GitHub ↗

Exception thrown in the case that an object name is invalid because it is a reserved word

Source from the content-addressed store, hash-verified

62 {
63 /// Exception thrown in the case that an object name is invalid because it is a reserved word
64 class reserved_word_error : public std::runtime_error
65 {
66 public:
67 explicit reserved_word_error(const std::string &t_word) noexcept
68 : std::runtime_error("Reserved word not allowed in object name: " + t_word), m_word(t_word)
69 {
70 }
71
72 reserved_word_error(const reserved_word_error &) = default;
73
74 ~reserved_word_error() noexcept override = default;
75
76 std::string word() const
77 {
78 return m_word;
79 }
80
81 private:
82 std::string m_word;
83 };
84
85 /// Exception thrown in the case that an object name is invalid because it contains illegal characters
86 class illegal_name_error : public std::runtime_error

Callers 1

validate_object_nameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected