19 #ifndef UNITY_EXCEPTION_H
20 #define UNITY_EXCEPTION_H
22 #include <unity/SymbolExport.h>
23 #include <unity/util/NonCopyable.h>
32 class ExceptionImplBase;
104 class UNITY_API
Exception :
public std::exception,
public std::nested_exception
120 virtual char const* what()
const noexcept = 0;
128 virtual std::exception_ptr
self()
const = 0;
130 std::string reason()
const;
132 std::string to_string(std::string
const& indent =
" ")
const;
133 std::string to_string(
int indent_level, std::string
const& indent)
const;
135 std::exception_ptr remember(std::exception_ptr earlier_exception);
136 std::exception_ptr get_earlier()
const noexcept;
140 Exception(std::shared_ptr<ExceptionImplBase>
const& derived);
145 std::shared_ptr<ExceptionImplBase> p_;