nanodbc
A small C++ wrapper for the native C ODBC API
Loading...
Searching...
No Matches
Macros

Configuration and utility macros that nanodbc uses, can be overriden by users. More...

Macros

#define NANODBC_THROW_NO_SOURCE_LOCATION   1
 Configures nanodbc::database_error message.
 
#define NANODBC_ASSERT(expression)   assert(expression)
 Assertion.
 

Detailed Description

Configuration and utility macros that nanodbc uses, can be overriden by users.

Macro Definition Documentation

◆ NANODBC_THROW_NO_SOURCE_LOCATION

#define NANODBC_THROW_NO_SOURCE_LOCATION   1

Configures nanodbc::database_error message.

If defined, removes source file name and line number from nanodbc::database_error message By default, nanodbc includes source location of exception in the error message.

◆ NANODBC_ASSERT

#define NANODBC_ASSERT (   expression)    assert(expression)

Assertion.

By default, nanodbc uses C assert() for internal assertions. User can override it by defining NANODBC_ASSERT(expr) macro in the nanodbc.h file and customizing it as desired, before building the library.

#ifdef _DEBUG
#include <crtdbg.h>
#define NANODBC_ASSERT _ASSERTE
#endif