OpenShot Library | libopenshot
0.4.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
w
Functions
Variables
Typedefs
Enumerations
Enumerator
a
b
c
e
f
g
h
l
m
p
r
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Functions
Files
File List
File Members
All
_
a
c
e
f
h
i
k
m
n
o
p
q
r
s
t
u
Functions
Variables
Typedefs
Macros
_
a
e
f
h
i
k
m
n
o
p
q
r
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
CrashHandler.h
Go to the documentation of this file.
1
9
// Copyright (c) 2008-2019 OpenShot Studios, LLC
10
//
11
// SPDX-License-Identifier: LGPL-3.0-or-later
12
13
#ifndef OPENSHOT_CRASH_HANDLER_H
14
#define OPENSHOT_CRASH_HANDLER_H
15
16
#include <cstdlib>
17
#include <stdio.h>
18
#include <signal.h>
19
#ifdef __MINGW32__
20
#include <winsock2.h>
21
#include <windows.h>
22
#include <DbgHelp.h>
23
#else
24
#include <execinfo.h>
25
#endif
26
#include <errno.h>
27
#include <cxxabi.h>
28
#include "
ZmqLogger.h
"
29
30
namespace
openshot
{
31
38
class
CrashHandler
{
39
private
:
41
CrashHandler
(){
return
;};
// Don't allow user to create an instance of this singleton
42
44
//CrashHandler(CrashHandler const&){}; // Don't allow the user to copy this instance
45
CrashHandler
(
CrashHandler
const
&) =
delete
;
// Don't allow the user to copy this instance
46
48
CrashHandler
& operator=(
CrashHandler
const
&) =
delete
;
// Don't allow the user to assign this instance
49
51
static
CrashHandler
*m_pInstance;
52
53
public
:
56
static
CrashHandler
*
Instance
();
57
58
#ifdef __MINGW32__
59
// TODO: Windows exception handling methods
60
static
void
abortHandler
(
int
signum);
61
#else
62
static
void
abortHandler
(
int
signum, siginfo_t* si,
void
* unused);
64
#endif
65
67
static
void
printStackTrace
(FILE *out,
unsigned
int
max_frames);
68
};
69
70
}
71
72
#endif
openshot::CrashHandler::printStackTrace
static void printStackTrace(FILE *out, unsigned int max_frames)
Method which prints a stacktrace.
Definition:
CrashHandler.cpp:112
openshot::CrashHandler::Instance
static CrashHandler * Instance()
Definition:
CrashHandler.cpp:27
openshot
This namespace is the default namespace for all code in the openshot library.
Definition:
Compressor.h:28
openshot::CrashHandler::abortHandler
static void abortHandler(int signum, siginfo_t *si, void *unused)
Method which handles crashes and logs error.
Definition:
CrashHandler.cpp:84
ZmqLogger.h
Header file for ZeroMQ-based Logger class.
openshot::CrashHandler
This class is designed to catch exceptions thrown by libc (SIGABRT, SIGSEGV, SIGILL,...
Definition:
CrashHandler.h:38
Generated by
1.8.17