Midnight Sun Firmware
Loading...
Searching...
No Matches
Status_Code

Global error library. More...

Macros

#define status_ok_or_return(code)
 Use to forward failures or continue on success. More...
 

Enumerations

enum  StatusCode {
  STATUS_CODE_OK = 0 , STATUS_CODE_UNKNOWN , STATUS_CODE_INVALID_ARGS , STATUS_CODE_RESOURCE_EXHAUSTED ,
  STATUS_CODE_UNREACHABLE , STATUS_CODE_TIMEOUT , STATUS_CODE_EMPTY , STATUS_CODE_OUT_OF_RANGE ,
  STATUS_CODE_UNIMPLEMENTED , STATUS_CODE_UNINITIALIZED , STATUS_CODE_INTERNAL_ERROR , STATUS_CODE_INCOMPLETE ,
  NUM_STATUS_CODES
}
 StatusCodes for various errors.
 

Detailed Description

Global error library.

Macro Definition Documentation

◆ status_ok_or_return

#define status_ok_or_return (   code)
Value:
({ \
__typeof__(code) status_expr = (code); \
if (status_expr) return status_expr; \
})

Use to forward failures or continue on success.