Go to the documentation of this file.Go to the SVN repository for this file.
53 # define xncbi_Validate(expression, message) \
55 if ( !(expression) ) \
56 NCBI_NS_NCBI::CNcbiDiag::DiagValidate(DIAG_COMPILE_INFO, #expression, message); \
60 # define xncbi_ValidateAndErrnoReport(expression, message) \
62 if ( !(expression) ) { \
63 string ext_message(message); \
64 ext_message += " (errno=" + NStr::NumericToString(NCBI_ERRNO_CODE_WRAPPER()) + \
66 string(NCBI_ERRNO_STR_WRAPPER(NCBI_ERRNO_CODE_WRAPPER())) + ")"; \
67 NCBI_NS_NCBI::CNcbiDiag::DiagValidate(DIAG_COMPILE_INFO, #expression, ext_message.c_str()); \
76 #if defined(NCBI_POSIX_THREADS)
77 # define xncbi_ValidatePthread(expression, expected_value, message) \
79 auto xvp_retval = expression; \
80 if (xvp_retval != expected_value) { \
81 string msg(message); \
82 msg += "(pthread error=" + NStr::NumericToString(xvp_retval) + \
84 string(NCBI_ERRNO_STR_WRAPPER(xvp_retval)); \
85 if ( xvp_retval == -1 ) { \
86 msg += " errno=" + NStr::NumericToString(errno); \
89 NCBI_NS_NCBI::CNcbiDiag::DiagValidate(DIAG_COMPILE_INFO, #expression, msg.c_str()); \
100 # define xncbi_Verify(expression) assert(expression)
101 # define xncbi_VerifyAndErrorReport(expression) \
103 if ( !(expression) ) \
104 assert(xncbi_VerifyReport(#expression)); \
110 # define xncbi_Verify(expression) while ( expression ) break
112 # define xncbi_VerifyAndErrorReport(expression) \
114 if ( !(expression) ) \
115 xncbi_VerifyReport(#expression); \
The NCBI C++ standard methods for dealing with std::string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Static variables safety - create on demand, destroy on application termination.
bool xncbi_VerifyReport(const char *expr)
Defines NCBI C++ exception handling.
Multi-threading – classes, functions, and features.