mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-23 00:50:42 +01:00
[orbis-kernel] add ORBIS_RET_ON_ERROR macro utility
This commit is contained in:
parent
dc44b619b2
commit
8e0f6b0319
|
|
@ -109,3 +109,10 @@ enum class ErrorCode : int {
|
|||
CAPMODE = 94, // Not permitted in capability mode
|
||||
};
|
||||
} // namespace orbis
|
||||
|
||||
#define ORBIS_RET_ON_ERROR(...) \
|
||||
do { \
|
||||
if (auto errc___ = (__VA_ARGS__); errc___ != ::orbis::ErrorCode{}) { \
|
||||
return errc___; \
|
||||
} \
|
||||
} while (false)
|
||||
|
|
|
|||
Loading…
Reference in a new issue