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