use the per-package backend on commit
[project/uci.git] / err.h
diff --git a/err.h b/err.h
index bc83863..e8b977b 100644 (file)
--- a/err.h
+++ b/err.h
  * and UCI_TRAP_RESTORE.
  */
 #define UCI_HANDLE_ERR(ctx) do {       \
+       DPRINTF("ENTER: %s\n", __func__); \
        int __val = 0;                  \
+       ctx->errno = 0;                 \
        if (!ctx)                       \
                return UCI_ERR_INVAL;   \
        if (!ctx->internal)             \
                __val = setjmp(ctx->trap); \
        ctx->internal = false;          \
        if (__val) {                    \
+               DPRINTF("LEAVE: %s, ret=%d\n", __func__, __val); \
                ctx->errno = __val;     \
                return __val;           \
        }                               \