NCBI C++ ToolKit
Macros | Functions
ncbidbg_p.hpp File Reference
#include <corelib/ncbi_safe_static.hpp>
#include <corelib/ncbithr.hpp>
#include <corelib/ncbiexpt.hpp>
#include <corelib/ncbistr.hpp>
#include <assert.h>
+ Include dependency graph for ncbidbg_p.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define xncbi_Validate(expression, message)
 
#define xncbi_ValidateAndErrnoReport(expression, message)
 
#define xncbi_ValidatePthread(expression, expected_value, message)
 
#define xncbi_Verify(expression)   assert(expression)
 
#define xncbi_VerifyAndErrorReport(expression)
 

Functions

bool xncbi_VerifyReport (const char *expr)
 

Macro Definition Documentation

◆ xncbi_Validate

#define xncbi_Validate (   expression,
  message 
)
Value:
do { \
if ( !(expression) ) \
NCBI_NS_NCBI::CNcbiDiag::DiagValidate(DIAG_COMPILE_INFO, #expression, message); \
} while ( 0 )
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
Definition: ncbidiag.hpp:170

Definition at line 53 of file ncbidbg_p.hpp.

◆ xncbi_ValidateAndErrnoReport

#define xncbi_ValidateAndErrnoReport (   expression,
  message 
)
Value:
do { \
if ( !(expression) ) { \
string ext_message(message); \
ext_message += " (errno=" + NStr::NumericToString(NCBI_ERRNO_CODE_WRAPPER()) + \
": " + \
NCBI_NS_NCBI::CNcbiDiag::DiagValidate(DIAG_COMPILE_INFO, #expression, ext_message.c_str()); \
} \
} while ( 0 )
#define NCBI_ERRNO_CODE_WRAPPER
Definition: ncbiexpt.hpp:1529
#define NCBI_ERRNO_STR_WRAPPER
Definition: ncbiexpt.hpp:1530
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
Definition: ncbistr.hpp:673

Definition at line 60 of file ncbidbg_p.hpp.

◆ xncbi_ValidatePthread

#define xncbi_ValidatePthread (   expression,
  expected_value,
  message 
)
Value:
do { \
auto xvp_retval = expression; \
if (xvp_retval != expected_value) { \
string msg(message); \
msg += "(pthread error=" + NStr::NumericToString(xvp_retval) + \
": " + \
string(NCBI_ERRNO_STR_WRAPPER(xvp_retval)); \
if ( xvp_retval == -1 ) { \
msg += " errno=" + NStr::NumericToString(errno); \
} \
msg += ")"; \
NCBI_NS_NCBI::CNcbiDiag::DiagValidate(DIAG_COMPILE_INFO, #expression, msg.c_str()); \
} \
} while ( 0 )

Definition at line 77 of file ncbidbg_p.hpp.

◆ xncbi_Verify

#define xncbi_Verify (   expression)    assert(expression)

Definition at line 100 of file ncbidbg_p.hpp.

◆ xncbi_VerifyAndErrorReport

#define xncbi_VerifyAndErrorReport (   expression)
Value:
do { \
if ( !(expression) ) \
assert(xncbi_VerifyReport(#expression)); \
} while ( 0 )
bool xncbi_VerifyReport(const char *expr)
Definition: ncbidbg.cpp:99

Definition at line 101 of file ncbidbg_p.hpp.

Function Documentation

◆ xncbi_VerifyReport()

bool xncbi_VerifyReport ( const char *  expr)

Definition at line 99 of file ncbidbg.cpp.

References ERR_POST.

Modified on Fri May 24 14:56:21 2024 by modify_doxy.py rev. 669887