[ox/std] Add oxRequireT for throwing instead of returning Errors
This commit is contained in:
parent
86f0e1ca08
commit
bcc4b5f816
1
deps/ox/src/ox/std/error.hpp
vendored
1
deps/ox/src/ox/std/error.hpp
vendored
@ -122,4 +122,5 @@ inline void oxIgnoreError(ox::Error) noexcept {}
|
||||
#define oxConcatImpl(a, b) a##b
|
||||
#define oxConcat(a, b) oxConcatImpl(a, b)
|
||||
#define oxRequire(out, x) auto [out, oxConcat(oxRequire_err_, __LINE__)] = x; oxReturnError(oxConcat(oxRequire_err_, __LINE__))
|
||||
#define oxRequireT(out, x) auto [out, oxConcat(oxRequire_err_, __LINE__)] = x; oxThrowError(oxConcat(oxRequire_err_, __LINE__))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user