Release ignored error contexts
This commit is contained in:
@@ -173,9 +173,10 @@ extern akerr_ErrorContext AKERR_ARRAY_ERROR[AKERR_MAX_ARRAY_ERROR];
|
||||
extern akerr_ErrorUnhandledErrorHandler akerr_handler_unhandled_error;
|
||||
extern akerr_ErrorLogFunction akerr_log_method;
|
||||
/*
|
||||
* The error IGNORE() last swallowed, per thread: an ignored error is a fact
|
||||
* about the thread that ignored it, and one shared slot would have two threads
|
||||
* overwriting each other's. Thread local only when AKERR_THREAD_SAFE is 1.
|
||||
* IGNORE()'s per-thread scratch pointer. It is non-NULL only while IGNORE()
|
||||
* logs the swallowed error; IGNORE() releases the context and clears this
|
||||
* pointer before returning to its caller. Thread local only when
|
||||
* AKERR_THREAD_SAFE is 1.
|
||||
*/
|
||||
extern AKERR_THREAD_LOCAL akerr_ErrorContext *__akerr_last_ignored;
|
||||
|
||||
@@ -437,6 +438,7 @@ akerr_ErrorContext AKERR_NOIGNORE *__akerr_copy_string(char *destination, int ca
|
||||
__akerr_last_ignored = __stmt; \
|
||||
if ( __akerr_last_ignored != NULL ) { \
|
||||
LOG_ERROR_WITH_MESSAGE(__akerr_last_ignored, "** IGNORED ERROR **"); \
|
||||
RELEASE_ERROR(__akerr_last_ignored); \
|
||||
}
|
||||
|
||||
#define CLEANUP \
|
||||
|
||||
Reference in New Issue
Block a user