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

Class name_conflict_error

include/chaiscript/dispatchkit/dispatchkit.hpp:109–129  ·  view source on GitHub ↗

Exception thrown in the case that an object name is invalid because it already exists in current context

Source from the content-addressed store, hash-verified

107
108 /// Exception thrown in the case that an object name is invalid because it already exists in current context
109 class name_conflict_error : public std::runtime_error
110 {
111 public:
112 explicit name_conflict_error(const std::string &t_name) noexcept
113 : std::runtime_error("Name already exists in current context " + t_name), m_name(t_name)
114 {
115 }
116
117 name_conflict_error(const name_conflict_error &) = default;
118
119 ~name_conflict_error() noexcept override = default;
120
121 std::string name() const
122 {
123 return m_name;
124 }
125
126 private:
127 std::string m_name;
128
129 };
130
131
132 /// Exception thrown in the case that a non-const object was added as a shared object

Callers 5

Dispatch_EngineClass · 0.85
add_objectMethod · 0.85
add_global_constMethod · 0.85
add_globalMethod · 0.85
add_functionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected