Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
panic.h File Reference

Panic function. More...

Include dependency graph for panic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 roc
 Root namespace.
 
 roc::core
 Basic building blocks.
 

Macros

#define roc_panic_if(x)
 Panic if condition is true. More...
 
#define roc_panic_if_not(x)   roc_panic_if(!(x))
 Panic if condition is false. More...
 
#define roc_panic(...)   ::roc::core::panic(ROC_STRINGIZE(ROC_MODULE), __FILE__, __LINE__, __VA_ARGS__)
 Print error message and terminate program gracefully. More...
 

Functions

void roc::core::panic (const char *module, const char *file, int line, const char *format,...) ROC_ATTR_NORETURN ROC_ATTR_PRINTF(4
 Print error message and terminate program gracefully. More...
 

Detailed Description

Panic function.

Definition in file panic.h.

Macro Definition Documentation

#define roc_panic (   ...)    ::roc::core::panic(ROC_STRINGIZE(ROC_MODULE), __FILE__, __LINE__, __VA_ARGS__)

Print error message and terminate program gracefully.

Remarks
Never returns and never throws.

Definition at line 42 of file panic.h.

#define roc_panic_if (   x)
Value:
do { \
if ((x)) { \
roc_panic("%s", #x); \
} \
} while (0)
#define roc_panic(...)
Print error message and terminate program gracefully.
Definition: panic.h:42

Panic if condition is true.

Note
This is a shorthand; roc_panic() with a meaningful error message is preferred way to panic.

Definition at line 26 of file panic.h.

#define roc_panic_if_not (   x)    roc_panic_if(!(x))

Panic if condition is false.

Note
This is a shorthand; roc_panic() with a meaningful error message is preferred way to panic.

Definition at line 37 of file panic.h.