more debugging
[project/uci.git] / err.h
diff --git a/err.h b/err.h
index 358cadfe942f4685d0166c8fa0bb5eb5641666fb..e8b977bc45f2735c8e2057b32eeeeb1d85834004 100644 (file)
--- a/err.h
+++ b/err.h
 #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;           \
        }                               \