Fixed an error bug

This commit is contained in:
2025-09-02 09:23:46 -05:00
parent f915a4208b
commit 71080682cc
9 changed files with 111 additions and 24 deletions

View File

@@ -151,10 +151,13 @@ errorret_t errorPrint(const errorret_t retval);
* @param retval The return value containing the error state.
* @return The error code if an error occurred, otherwise continues execution.
*/
#define errorChain(retval) \
if ((retval).code != ERROR_OK) { \
return errorChainImpl(retval, __FILE__, __func__, __LINE__); \
}
#define errorChain(retval) { \
errorret_t errorChainRetval = (retval); \
if (errorChainRetval.code != ERROR_OK) { \
return errorChainImpl(errorChainRetval, __FILE__, __func__, __LINE__); \
} \
}
/**
* Returns without an error.