-
Notifications
You must be signed in to change notification settings - Fork 56
/
exc.go
57 lines (55 loc) · 3.23 KB
/
exc.go
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
package py
// #include <Python.h>
import "C"
var (
BaseException = newException(C.PyExc_BaseException)
Exception = newException(C.PyExc_Exception)
StopIteration = newException(C.PyExc_StopIteration)
GeneratorExit = newException(C.PyExc_GeneratorExit)
StandardError = newException(C.PyExc_StandardError)
ArithmeticError = newException(C.PyExc_ArithmeticError)
LookupError = newException(C.PyExc_LookupError)
AssertionError = newException(C.PyExc_AssertionError)
AttributeError = newException(C.PyExc_AttributeError)
EOFError = newException(C.PyExc_EOFError)
FloatingPointError = newException(C.PyExc_FloatingPointError)
EnvironmentError = newException(C.PyExc_EnvironmentError)
IOError = newException(C.PyExc_IOError)
OSError = newException(C.PyExc_OSError)
ImportError = newException(C.PyExc_ImportError)
IndexError = newException(C.PyExc_IndexError)
KeyError = newException(C.PyExc_KeyError)
KeyboardInterrupt = newException(C.PyExc_KeyboardInterrupt)
MemoryError = newException(C.PyExc_MemoryError)
NameError = newException(C.PyExc_NameError)
OverflowError = newException(C.PyExc_OverflowError)
RuntimeError = newException(C.PyExc_RuntimeError)
NotImplementedError = newException(C.PyExc_NotImplementedError)
SyntaxError = newException(C.PyExc_SyntaxError)
IndentationError = newException(C.PyExc_IndentationError)
TabError = newException(C.PyExc_TabError)
ReferenceError = newException(C.PyExc_ReferenceError)
SystemError = newException(C.PyExc_SystemError)
SystemExit = newException(C.PyExc_SystemExit)
TypeError = newException(C.PyExc_TypeError)
UnboundLocalError = newException(C.PyExc_UnboundLocalError)
UnicodeError = newException(C.PyExc_UnicodeError)
UnicodeEncodeError = newException(C.PyExc_UnicodeEncodeError)
UnicodeDecodeError = newException(C.PyExc_UnicodeDecodeError)
UnicodeTranslateError = newException(C.PyExc_UnicodeTranslateError)
ValueError = newException(C.PyExc_ValueError)
ZeroDivisionError = newException(C.PyExc_ZeroDivisionError)
BufferError = newException(C.PyExc_BufferError)
MemoryErrorInst = newException(C.PyExc_MemoryErrorInst)
RecursionErrorInst = newException(C.PyExc_RecursionErrorInst)
Warning = newException(C.PyExc_Warning)
UserWarning = newException(C.PyExc_UserWarning)
DeprecationWarning = newException(C.PyExc_DeprecationWarning)
PendingDeprecationWarning = newException(C.PyExc_PendingDeprecationWarning)
SyntaxWarning = newException(C.PyExc_SyntaxWarning)
RuntimeWarning = newException(C.PyExc_RuntimeWarning)
FutureWarning = newException(C.PyExc_FutureWarning)
ImportWarning = newException(C.PyExc_ImportWarning)
UnicodeWarning = newException(C.PyExc_UnicodeWarning)
BytesWarning = newException(C.PyExc_BytesWarning)
)