TSDuck v3.45-4725
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsFatal.h File Reference

Handle some fatal situations. More...

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Macros

#define TS_FATAL(literal)
 Abort the application with a fatal error message.
 
#define TS_FATALMSG(literal)   "\n\n*** " literal ", aborting...\n\n"
 Build a string literal for fatal error messages.
 

Functions

void ts::FatalError (const char *message, size_t length)
 Handle a fatal error.
 

Detailed Description

Handle some fatal situations.

Important: By default, without specific "nothrow" form of allocator, the operator "new" and std::make_shared() never return a null pointer. They throw std::bad_alloc in case of allocation failure. Therefore, it is useless to test such new pointers for a null value and trigger a fatal error.