[ox/std] Add ox::errCode for extracting error code from Error

This commit is contained in:
Gary Talent 2022-04-10 03:04:15 -05:00
parent 9d74eca436
commit b5210ff897

View File

@ -75,6 +75,11 @@ struct [[nodiscard]] Error {
};
[[nodiscard]]
constexpr auto errCode(const Error &err) noexcept {
return err.errCode;
}
template<typename T=const char*>
[[nodiscard]]
constexpr auto toStr(const Error &err) noexcept {