summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 7a7ec53..43b8a95 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1741,6 +1741,7 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#define FUNC_ENTER_COMMON(func_name,asrt) \
static const char FUNC[]=#func_name; \
+ hbool_t err_occurred = FALSE; \
FUNC_ENTER_COMMON_NOFUNC(func_name,asrt);
/* Threadsafety initialization code for API routines */
@@ -1910,7 +1911,9 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#define FUNC_LEAVE_API(ret_value) \
FINISH_MPE_LOG; \
H5TRACE_RETURN(ret_value); \
- H5_POP_FUNC \
+ H5_POP_FUNC \
+ if(err_occurred) \
+ (void)H5E_dump_api_stack(TRUE); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \
} /*end scope from end of FUNC_ENTER*/ \
@@ -1919,6 +1922,8 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#define FUNC_LEAVE_API_NOFS(ret_value) \
FINISH_MPE_LOG; \
H5TRACE_RETURN(ret_value); \
+ if(err_occurred) \
+ (void)H5E_dump_api_stack(TRUE); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \
} /*end scope from end of FUNC_ENTER*/ \