LibreOffice Module tools (master) 1
Macros | Typedefs | Functions
debug.hxx File Reference
#include <tools/toolsdllapi.h>
#include <sal/detail/log.h>
Include dependency graph for debug.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DBG_TESTSOLARMUTEX()
 
#define DBG_ASSERT(sCon, aError)    SAL_DETAIL_WARN_IF_FORMAT(!(sCon), "legacy.tools", "%s", aError)
 

Typedefs

typedef void(* DbgTestSolarMutexProc) ()
 The facilities provided by this header are deprecated. More...
 

Functions

TOOLS_DLLPUBLIC void DbgSetTestSolarMutex (DbgTestSolarMutexProc pParam)
 
TOOLS_DLLPUBLIC void DbgTestSolarMutex ()
 

Macro Definition Documentation

◆ DBG_ASSERT

#define DBG_ASSERT (   sCon,
  aError 
)     SAL_DETAIL_WARN_IF_FORMAT(!(sCon), "legacy.tools", "%s", aError)

Definition at line 57 of file debug.hxx.

◆ DBG_TESTSOLARMUTEX

#define DBG_TESTSOLARMUTEX ( )
Value:
do \
{ \
DbgTestSolarMutex(); \
} while(false)

Definition at line 45 of file debug.hxx.

Typedef Documentation

◆ DbgTestSolarMutexProc

typedef void(* DbgTestSolarMutexProc) ()

The facilities provided by this header are deprecated.

True assertions (that detect broken program logic) should use standard assert (which aborts if an assertion fails, and is controlled by the standard NDEBUG macro). Logging of warnings (e.g., about malformed input) should use the facilities provided by sal/log.hxx.

Because the assertion macro (DBG_ASSERT) has been used for true assertions as well as to log warnings, it maps to SAL_WARN instead of standard assert.

Definition at line 37 of file debug.hxx.

Function Documentation

◆ DbgSetTestSolarMutex()

TOOLS_DLLPUBLIC void DbgSetTestSolarMutex ( DbgTestSolarMutexProc  pParam)

Definition at line 40 of file debug.cxx.

References aDebugData.

◆ DbgTestSolarMutex()

TOOLS_DLLPUBLIC void DbgTestSolarMutex ( )

Definition at line 47 of file debug.cxx.

References aDebugData, and SAL_WARN_IF.