This repository has been archived by the owner on Feb 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
handlerError.cpp
executable file
·102 lines (100 loc) · 2.74 KB
/
handlerError.cpp
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*/
ErrorHandler.cpp (14.01.2005)
/*/
#include "handlerError.h"
void trans_func( unsigned int u, _EXCEPTION_POINTERS* pExp )
{
switch (u)
{
case STATUS_WAIT_0:
throw STATUS_WAIT_0_Exception();
break;
case STATUS_ABANDONED_WAIT_0:
throw STATUS_ABANDONED_WAIT_0_Exception();
break;
case STATUS_USER_APC:
throw STATUS_USER_APC_Exception();
break;
case STATUS_TIMEOUT:
throw STATUS_TIMEOUT_Exception();
break;
case STATUS_PENDING:
throw STATUS_PENDING_Exception();
break;
case STATUS_SEGMENT_NOTIFICATION:
throw STATUS_SEGMENT_NOTIFICATION_Exception();
break;
case STATUS_GUARD_PAGE_VIOLATION:
throw STATUS_GUARD_PAGE_VIOLATION_Exception();
break;
case STATUS_DATATYPE_MISALIGNMENT:
throw STATUS_DATATYPE_MISALIGNMENT_Exception();
break;
case STATUS_BREAKPOINT:
throw STATUS_BREAKPOINT_Exception();
break;
case STATUS_SINGLE_STEP:
throw STATUS_SINGLE_STEP_Exception();
break;
case STATUS_ACCESS_VIOLATION:
throw SSTATUS_ACCESS_VIOLATION_Exception();
break;
case STATUS_IN_PAGE_ERROR:
throw STATUS_IN_PAGE_ERROR_Exception();
break;
case STATUS_INVALID_HANDLE:
throw STATUS_INVALID_HANDLE_Exception();
break;
case STATUS_NO_MEMORY:
throw STATUS_NO_MEMORY_Exception();
break;
case STATUS_ILLEGAL_INSTRUCTION:
throw STATUS_ILLEGAL_INSTRUCTION_Exception();
break;
case STATUS_NONCONTINUABLE_EXCEPTION:
throw STATUS_NONCONTINUABLE_EXCEPTION_Exception();
break;
case STATUS_INVALID_DISPOSITION:
throw STATUS_INVALID_DISPOSITION_Exception();
break;
case STATUS_ARRAY_BOUNDS_EXCEEDED:
throw STATUS_ARRAY_BOUNDS_EXCEEDED_Exception();
break;
case STATUS_FLOAT_DENORMAL_OPERAND:
throw STATUS_FLOAT_DENORMAL_OPERAND_Exception();
break;
case STATUS_FLOAT_DIVIDE_BY_ZERO:
throw STATUS_FLOAT_DIVIDE_BY_ZERO_Exception();
break;
case STATUS_FLOAT_INEXACT_RESULT:
throw STATUS_FLOAT_INEXACT_RESULT_Exception();
break;
case STATUS_FLOAT_INVALID_OPERATION:
throw STATUS_FLOAT_INVALID_OPERATION_Exception();
break;
case STATUS_FLOAT_STACK_CHECK:
throw STATUS_FLOAT_OVERFLOW_Exception();
break;
case STATUS_FLOAT_UNDERFLOW:
throw STATUS_FLOAT_UNDERFLOW_Exception();
break;
case STATUS_INTEGER_DIVIDE_BY_ZERO:
throw STATUS_INTEGER_DIVIDE_BY_ZERO_Exception();
break;
case STATUS_INTEGER_OVERFLOW:
throw STATUS_INTEGER_OVERFLOW_Exception();
break;
case STATUS_PRIVILEGED_INSTRUCTION:
throw STATUS_PRIVILEGED_INSTRUCTION_Exception();
break;
case STATUS_STACK_OVERFLOW:
throw STATUS_STACK_OVERFLOW_Exception();
break;
case STATUS_CONTROL_C_EXIT:
throw STATUS_CONTROL_C_EXIT_Exception();
break;
default:
throw STATUS_UNKNOWN_Exception();
break;
}
}