Display more debug info on error.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-09-23 17:29:22 +02:00
parent cd66e65b9c
commit 9fa2c5d39c

View File

@@ -44,7 +44,7 @@ extern const bool _btrue, _bfalse;
error = f; \
if (error != CborNoError) \
{ \
printf("Cannot encode CBOR [%s:%d]: %s\n", __FILE__, __LINE__, #f); \
printf("Cannot encode CBOR [%s:%d]: %s (%d)\n", __FILE__, __LINE__, #f, error); \
goto err; \
} \
} while (0)