[ox/std] Add ox::errCode for extracting error code from Error
This commit is contained in:
parent
9d74eca436
commit
b5210ff897
5
deps/ox/src/ox/std/error.hpp
vendored
5
deps/ox/src/ox/std/error.hpp
vendored
@ -75,6 +75,11 @@ struct [[nodiscard]] Error {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
constexpr auto errCode(const Error &err) noexcept {
|
||||||
|
return err.errCode;
|
||||||
|
}
|
||||||
|
|
||||||
template<typename T=const char*>
|
template<typename T=const char*>
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr auto toStr(const Error &err) noexcept {
|
constexpr auto toStr(const Error &err) noexcept {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user