Remove spurious duplicate lines from the stacktrace. Only log the DETECT and FAIL points, everything else is noise.
This commit is contained in:
@@ -32,7 +32,7 @@ add_library(akerror SHARED
|
||||
)
|
||||
|
||||
target_include_directories(akerror PUBLIC
|
||||
$<BUILD_INTERFACE:${GENERATED_DIR}>/include
|
||||
$<BUILD_INTERFACE:${GENERATED_DIR}/include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
@@ -66,7 +66,7 @@ install(TARGETS akerror
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
install(FILES "include/akerror.h" DESTINATION "include/")
|
||||
install(FILES ${GENERATED_AKERROR_H} DESTINATION "include/")
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/akerror.pc DESTINATION "lib/pkgconfig/")
|
||||
|
||||
install(EXPORT akerrorTargets
|
||||
|
||||
@@ -194,7 +194,6 @@ void akerr_init_errno(void);
|
||||
#define DETECT(__err_context, __stmt) \
|
||||
VALID(__err_context, __stmt); \
|
||||
if ( __err_context != NULL ) { \
|
||||
__err_context->stacktracebufptr += snprintf(__err_context->stacktracebufptr, AKERR_MAX_ERROR_STACKTRACE_BUF_LENGTH, "%s:%s:%d: Detected error %d from array (refcount %d)\n", (char *)__FILE__, (char *)__func__, __LINE__, __err_context->arrayid, __err_context->refcount); \
|
||||
if ( __err_context->status != 0 ) { \
|
||||
__err_context->stacktracebufptr += snprintf(__err_context->stacktracebufptr, AKERR_MAX_ERROR_STACKTRACE_BUF_LENGTH, "%s:%s:%d\n", (char *)__FILE__, (char *)__func__, __LINE__); \
|
||||
break; \
|
||||
@@ -246,7 +245,6 @@ void akerr_init_errno(void);
|
||||
#define FINISH_LOGIC(__err_context, __pass_up) \
|
||||
if ( __err_context != NULL ) { \
|
||||
if ( __err_context->handled == false && __pass_up == true ) { \
|
||||
__err_context->stacktracebufptr += snprintf(__err_context->stacktracebufptr, AKERR_MAX_ERROR_STACKTRACE_BUF_LENGTH, "%s:%s:%d\n", (char *)__FILE__, (char *)__func__, __LINE__); \
|
||||
return __err_context; \
|
||||
} \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user