mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-03-01 06:55:48 +00: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…
x
Reference in New Issue
Block a user