1
0
Fork 0
forked from lthn/blockchain

in CATCH_ENTRY_CUSTOM custom_code moved before error logging

This commit is contained in:
sowle 2022-10-12 17:51:32 +02:00
parent ab268af7b8
commit 08fd1d4248
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -54,14 +54,14 @@
catch(const std::exception& ex) \
{ \
(void)(ex); \
LOG_ERROR("Exception at [" << location << "], what=" << ex.what()); \
custom_code; \
LOG_ERROR("Exception at [" << location << "], what=" << ex.what()); \
return return_val; \
} \
catch(...) \
{ \
LOG_ERROR("Exception at [" << location << "], generic exception \"...\""); \
custom_code; \
LOG_ERROR("Exception at [" << location << "], generic exception \"...\""); \
return return_val; \
}
#define CATCH_ENTRY(location, return_val) CATCH_ENTRY_CUSTOM(location, (void)0, return_val)