UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
debug.hpp File Reference
#include <cassert>
#include <QMessageBox>
#include <stdlib.h>
Include dependency graph for debug.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ASSERT_GUI(x)
 
#define DEBUG_ASSERT(x)
 
#define DEBUG_ASSERT_GUI(x)
 
#define DEBUG_FAIL(x)
 

Functions

static void abort_msgBox (const char *msg)
 

Macro Definition Documentation

◆ ASSERT_GUI

#define ASSERT_GUI ( x)
Value:
if(!(x)) abort_msgBox("Assert failed: " #x)
static void abort_msgBox(const char *msg)
Definition debug.hpp:20

Definition at line 8 of file debug.hpp.

◆ DEBUG_ASSERT

#define DEBUG_ASSERT ( x)
Value:
do{ }while(0)

Definition at line 14 of file debug.hpp.

◆ DEBUG_ASSERT_GUI

#define DEBUG_ASSERT_GUI ( x)
Value:
do{ }while(0)

Definition at line 15 of file debug.hpp.

◆ DEBUG_FAIL

#define DEBUG_FAIL ( x)
Value:
DEBUG_ASSERT((x) && false)
#define DEBUG_ASSERT(x)
Definition debug.hpp:14

Definition at line 18 of file debug.hpp.

Function Documentation

◆ abort_msgBox()

static void abort_msgBox ( const char * msg)
inlinestatic

Definition at line 20 of file debug.hpp.

20 {
21 QMessageBox msgBox;
22 msgBox.setText(msg);
23 msgBox.setIcon(QMessageBox::Critical);
24 msgBox.exec();
25 exit(EXIT_FAILURE);
26}

Referenced by LaunchManager::doLaunch().