9 #include "quill/core/Attributes.h" 10 #include "quill/core/Common.h" 15 #if defined(QUILL_NO_EXCEPTIONS) 19 #define QUILL_REQUIRE(expression, error) \ 22 if (QUILL_UNLIKELY(!(expression))) \ 24 printf("Quill fatal error: %s (%s:%d)\n", error, QUILL_FILE_NAME, QUILL_LINE_NO); \ 29 #define QUILL_TRY if (true) 30 #define QUILL_THROW(ex) QUILL_REQUIRE(false, ex.what()) 31 #define QUILL_CATCH(x) if (false) 32 #define QUILL_CATCH_ALL() if (false) 35 #define QUILL_THROW(ex) throw(ex) 36 #define QUILL_CATCH(x) catch (x) 37 #define QUILL_CATCH_ALL() catch (...) 48 explicit QuillError(std::string s) : _error(static_cast<std::string&&>(s)) {}
49 explicit QuillError(
char const* s) : _error(s) {}
51 QUILL_NODISCARD
char const* what()
const noexcept
override {
return _error.data(); }
custom exception
Definition: QuillError.h:45