You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe:
There are some duplicate code in rdsn and pegasus project, we can simplify them by some useful macros.
Describe the feature you'd like:
We can add some macros like:
// Return the given status if it is not ERR_OK.
#define ERR_LOG_AND_RETURN_NOT_OK(s, ...) \
do { \
error_code _err = (s); \
if (dsn_unlikely(_err != ERR_OK)) { \
derror_f("{}: {}", _err, fmt::format(__VA_ARGS__)); \
return _err; \
} \
} while (0)
// Return the given status if condition is not true.
#define ERR_LOG_AND_RETURN_NOT_TRUE(s, err, ...) \
do { \
if (dsn_unlikely(!(s))) { \
derror_f("{}: {}", err, fmt::format(__VA_ARGS__)); \
return err; \
} \
} while (0)
The text was updated successfully, but these errors were encountered:
Feature Request
Is your feature request related to a problem? Please describe:
There are some duplicate code in rdsn and pegasus project, we can simplify them by some useful macros.
Describe the feature you'd like:
We can add some macros like:
The text was updated successfully, but these errors were encountered: