try_stderrcode
This commit is contained in:
@@ -85,3 +85,10 @@ typedef struct Result_ {
|
||||
Error_printAndExit(_rname(N).error);\
|
||||
};\
|
||||
} while(0)
|
||||
|
||||
#define try_stderrcode(CALL) do {\
|
||||
int r = CALL;\
|
||||
if(r != 0){\
|
||||
Return RESULT_ERROR(strerror(r), false);\
|
||||
}\
|
||||
} while(0)
|
||||
|
||||
Reference in New Issue
Block a user