6 #ifndef KNOWROB_KNOWROB_ERROR_H
7 #define KNOWROB_KNOWROB_ERROR_H
16 class KnowRobError :
public std::runtime_error {
29 KnowRobError(std::string_view exc_type, std::string_view msg, std::string_view trace);
46 KnowRobError(std::string_view exc_type, std::string_view msg, std::string_view
file,
int line, std::string_view trace);
74 std::optional<std::string>
file_;
79 #define LOG_KNOWROB_ERROR(err, msg, ...) \
81 KB_ERROR("{}. Origin of error is:", fmt::format(msg, ##__VA_ARGS__)); \
82 KB_ERROR1(err.file()->c_str(), err.line(), err.what()); \
84 KB_ERROR("{}. {}", fmt::format(msg, ##__VA_ARGS__), err.what()); \
KnowRobError(std::string_view exc_type, std::string_view msg, std::string_view file, int line, std::string_view trace)
KnowRobError(std::string_view exc_type, std::string_view msg)
KnowRobError(std::string_view exc_type, std::string_view msg, std::string_view file, int line)
std::optional< std::string > file_
KnowRobError(std::string_view exc_type, std::string_view msg, std::string_view trace)
void setFile(std::string_view file)