acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
translator.h
1
/*
2
Copyright (ca) 2001
3
Author: Konstantin Boukreev
4
E-mail:
[email protected]
5
Created: 25.12.2001 14:47:20
6
Version: 1.0.0
7
8
Permission to use, copy, modify, distribute and sell this software
9
and its documentation for any purpose is hereby granted without fee,
10
provided that the above copyright notice appear in all copies and
11
that both that copyright notice and this permission notice appear
12
in supporting documentation. Konstantin Boukreev makes no representations
13
about the suitability of this software for any purpose.
14
It is provided "as is" without express or implied warranty.
15
16
wrapper class for _set_se_translator API
17
maps Win32 exceptions (C structured exceptions) into C++ typed exceptions.
18
*/
19
20
#pragma once
21
22
#ifdef WINDOWS
23
#include <eh.h>
24
#endif
25
26
27
#if defined(LINUX) || defined(__APPLE__) || defined(__ANDROID__)
28
#define EXCEPTION_TRANSLATOR_USE_SIGNAL
29
#endif
30
31
33
34
35
//extern CLASS_DECL_ACME bool g_bExiting;
36
37
//
38
//namespace exception
39
//{
40
41
42
class
CLASS_DECL_ACME exception_translator :
43
virtual
public
matter
44
{
45
protected
:
46
47
bool
m_bSet;
48
49
public
:
50
51
//#ifdef EXCEPTION_TRANSLATOR_USE_SIGNAL
52
//
53
// void * m_psig;
54
//
55
//#endif
56
57
exception_translator();
58
~exception_translator()
override
;
59
60
//#ifdef WINDOWS
61
// virtual void filter(::u32 uiCode, _EXCEPTION_POINTERS * i32_point);
62
// //static void __cdecl filter2(::u32 uiCode, _EXCEPTION_POINTERS * i32_point);
63
// //void filter( _EXCEPTION_POINTERS * i32_point);
64
//#endif
65
66
67
68
virtual
bool
attach();
69
virtual
bool
detach();
70
71
72
#ifdef WINDOWS
73
74
75
virtual
string
_get_standard_exception_name(::u32 uiCode);
76
virtual
string
_get_standard_exception_description(::u32 uiCode);
77
78
79
#endif
80
81
};
82
83
//
84
//} // namespace exception
85
//
86
//
exception
translator.h
Generated by
1.17.0