MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / TemplateException

Class TemplateException

erpcgen/src/cpptemplate/cpptempl.hpp:258–279  ·  view source on GitHub ↗

Custom exception class for library errors

Source from the content-addressed store, hash-verified

256
257// Custom exception class for library errors
258class TemplateException : public std::exception
259{
260 uint32_t m_line;
261 std::string m_reason;
262
263public:
264 TemplateException(std::string reason)
265 : std::exception()
266 , m_line(0)
267 , m_reason(reason)
268 {
269 }
270 TemplateException(size_t line, std::string reason);
271 TemplateException(const TemplateException &other) = default;
272 TemplateException &operator=(const TemplateException &other) = default;
273 virtual ~TemplateException() = default;
274
275 void set_reason(std::string reason) { m_reason = reason; }
276 void set_line_if_missing(size_t line);
277
278 virtual const char *what() const NOEXCEPT NOTHROW { return m_reason.c_str(); }
279};
280
281// convenience functions for making data objects
282inline data_ptr make_data(bool val)

Callers 14

generateOutputFileMethod · 0.85
parseSubtemplatesMethod · 0.85
parseSubtemplatesMethod · 0.85
parseSubtemplatesMethod · 0.85
getvalueMethod · 0.85
cpptempl.cppFile · 0.85
evalMethod · 0.85
matchMethod · 0.85
tokenize_statementFunction · 0.85
get_var_valueMethod · 0.85
parse_factorMethod · 0.85
set_childrenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected