Chunk loading example

This commit is contained in:
2025-11-09 12:50:15 -06:00
parent eff5fc3d9a
commit 307f3a9dec
12 changed files with 169 additions and 21 deletions

View File

@@ -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");

View File

@@ -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__); \
} \
}