Chunk loading example
This commit is contained in:
@@ -74,7 +74,7 @@ errorret_t errorChainImpl(
|
||||
const char_t *function,
|
||||
const int32_t line
|
||||
) {
|
||||
if (retval.code == ERROR_OK) return retval;
|
||||
if(retval.code == ERROR_OK) return retval;
|
||||
|
||||
assertNotNull(retval.state, "Error state NULL (Likely missing errorOk)");
|
||||
assertNotNull(retval.state->message, "Message cannot be NULL");
|
||||
@@ -106,7 +106,7 @@ errorret_t errorChainImpl(
|
||||
}
|
||||
|
||||
void errorCatch(const errorret_t retval) {
|
||||
if (retval.code == ERROR_OK) return;
|
||||
if(retval.code == ERROR_OK) return;
|
||||
|
||||
assertNotNull(retval.state, "Error state cannot be NULL");
|
||||
assertNotNull(retval.state->message, "Message cannot be NULL");
|
||||
@@ -115,7 +115,7 @@ void errorCatch(const errorret_t retval) {
|
||||
}
|
||||
|
||||
errorret_t errorPrint(const errorret_t retval) {
|
||||
if (retval.code == ERROR_OK) return retval;
|
||||
if(retval.code == ERROR_OK) return retval;
|
||||
|
||||
assertNotNull(retval.state, "Error state cannot be NULL");
|
||||
assertNotNull(retval.state->message, "Message cannot be NULL");
|
||||
|
||||
@@ -152,7 +152,7 @@ errorret_t errorPrint(const errorret_t retval);
|
||||
*/
|
||||
#define errorChain(retval) { \
|
||||
errorret_t errorChainRetval = (retval); \
|
||||
if (errorChainRetval.code != ERROR_OK) { \
|
||||
if(errorChainRetval.code != ERROR_OK) { \
|
||||
return errorChainImpl(errorChainRetval, __FILE__, __func__, __LINE__); \
|
||||
} \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user