20 class LocalException :
public std::exception
30 LocalException(
const LocalException& e) noexcept;
35 LocalException(
const std::string& reason) : reason(reason), backtrace(
""), output_buffer(
"")
37 backtrace = std::runtime_error(generateBacktrace());
44 ~LocalException() noexcept override = default;
49 const
char* what() const noexcept override;
57 return "armarx::LocalException";
63 void setReason(
const std::string& reason);
69 std::string getReason()
const;
74 static std::string generateBacktrace();
82 reason = std::runtime_error(ss.str());
102 std::string generateOutputString()
const;
107 std::runtime_error reason;
113 std::runtime_error backtrace;
119 mutable std::runtime_error output_buffer;
123 "LocalException must be nothrow copy constructible");