19 #ifndef LOMIRI_EXCEPTION_H
20 #define LOMIRI_EXCEPTION_H
22 #include <lomiri/SymbolExport.h>
31 class ExceptionImplBase;
103 class LOMIRI_API
Exception :
public std::exception,
public std::nested_exception
112 char const* what()
const noexcept
override;
120 virtual std::exception_ptr
self()
const = 0;
122 std::string name()
const;
123 std::string reason()
const;
125 std::string to_string(std::string
const& indent =
" ")
const;
126 std::string to_string(
int indent_level, std::string
const& indent)
const;
128 std::exception_ptr remember(std::exception_ptr earlier_exception);
129 std::exception_ptr get_earlier()
const noexcept;
132 Exception(std::string
const& name, std::string
const& reason);
137 mutable std::string what_;
138 std::exception_ptr earlier_;