/
CCrashHandler.h
40 lines (30 loc) · 988 Bytes
/
CCrashHandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*****************************************************************************
*
* PROJECT: Multi Theft Auto v1.0
* LICENSE: See LICENSE in the top level directory
* FILE: core/CCrashHandler.h
* PURPOSE: Crash handler class
*
* Multi Theft Auto is available from http://www.multitheftauto.com/
*
*****************************************************************************/
#pragma once
#include "CCrashHandlerAPI.h"
#ifdef WIN32
#include <windows.h>
#else
#include <signal.h>
#endif
class CCrashHandler
{
public:
static void Init(const SString& strServerPath);
private:
#ifdef WIN32
static long WINAPI HandleExceptionGlobal(_EXCEPTION_POINTERS* pException);
static void DumpMiniDump(_EXCEPTION_POINTERS* pException, CExceptionInformation* pExceptionInformation);
static void RunErrorTool(void);
#else
static void HandleExceptionGlobal(int iSig);
#endif
};