OpenShot Library | libopenshot  0.3.3
Static Public Member Functions | List of all members
openshot::CrashHandler Class Reference

This class is designed to catch exceptions thrown by libc (SIGABRT, SIGSEGV, SIGILL, SIGFPE) More...

#include <CrashHandler.h>

Static Public Member Functions

static void abortHandler (int signum, siginfo_t *si, void *unused)
 Method which handles crashes and logs error. More...
 
static CrashHandlerInstance ()
 
static void printStackTrace (FILE *out, unsigned int max_frames)
 Method which prints a stacktrace. More...
 

Detailed Description

This class is designed to catch exceptions thrown by libc (SIGABRT, SIGSEGV, SIGILL, SIGFPE)

This class is a singleton which only needs to be instantiated 1 time, and it will register as a signal handler with libc, and log errors using the ZmqLogger class.

Definition at line 38 of file CrashHandler.h.

Member Function Documentation

◆ abortHandler()

void CrashHandler::abortHandler ( int  signum,
siginfo_t *  si,
void *  unused 
)
static

Method which handles crashes and logs error.

Definition at line 84 of file CrashHandler.cpp.

◆ Instance()

CrashHandler * CrashHandler::Instance ( )
static

Create or get an instance of this crash handler singleton (invoke the class with this method). This also registers the instance as a signal handler for libc

Definition at line 27 of file CrashHandler.cpp.

Referenced by openshot::Timeline::Timeline().

◆ printStackTrace()

void CrashHandler::printStackTrace ( FILE *  out,
unsigned int  max_frames 
)
static

Method which prints a stacktrace.

Definition at line 112 of file CrashHandler.cpp.


The documentation for this class was generated from the following files: