From 53939a28c6ecd51dca841e847e84b86c664720e6 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 19 Feb 2022 01:43:29 -0600 Subject: [PATCH] [ox/std] Add const char *toStr(const ox::Error&) --- deps/ox/src/ox/std/error.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deps/ox/src/ox/std/error.hpp b/deps/ox/src/ox/std/error.hpp index 28175844..67e3d060 100644 --- a/deps/ox/src/ox/std/error.hpp +++ b/deps/ox/src/ox/std/error.hpp @@ -75,6 +75,11 @@ struct [[nodiscard]] Error { }; +[[nodiscard]] +constexpr auto toStr(const Error &err) noexcept { + return err.msg; +} + struct Exception: public std::exception { const char *msg = nullptr; const char *file = nullptr;