6 #include <knowrob/KnowRobError.h>
7 #include <knowrob/Logger.h>
11 static inline std::string makeWhat(std::string_view exc_type, std::string_view exc_msg, std::string_view exc_trace) {
12 if (exc_trace.empty()) {
13 return fmt::format(
"{}: {}", exc_type, exc_msg);
15 return fmt::format(
"{}: {}\n{}", exc_type, exc_msg, exc_trace);
20 : std::runtime_error(makeWhat(exc_type, exc_msg,
"")), line_(0) {
24 : std::runtime_error(makeWhat(exc_type, exc_msg, exc_trace)), line_(0) {
28 : std::runtime_error(makeWhat(exc_type, exc_msg,
"")), file_(exc_file), line_(exc_line) {
32 std::string_view exc_trace)
33 : std::runtime_error(makeWhat(exc_type, exc_msg, exc_trace)), file_(exc_file), line_(exc_line) {
KnowRobError(std::string_view exc_type, std::string_view msg)