forked from lthn/blockchain
in CATCH_ENTRY_CUSTOM custom_code moved before error logging
This commit is contained in:
parent
ab268af7b8
commit
08fd1d4248
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue