20 class LocalException:
public std::exception
30 LocalException(
const LocalException& e) noexcept;
34 LocalException(
const std::string& reason) :
35 reason(reason), backtrace(
""), output_buffer(
"")
37 backtrace = std::runtime_error(generateBacktrace());
44 ~LocalException() noexcept override = default;
49 const
char* what() const noexcept override;
53 virtual
std::
string name()
const
55 return "armarx::LocalException";
61 void setReason(
const std::string& reason);
67 std::string getReason()
const;
72 static std::string generateBacktrace();
79 reason = std::runtime_error(ss.str());
98 std::string generateOutputString()
const;
103 std::runtime_error reason;
109 std::runtime_error backtrace;
115 mutable std::runtime_error output_buffer;
118 "LocalException must be nothrow copy constructible");