Skip to content

Commit 4107acf

Browse files
committed
Add missing exception type pointers
1 parent 0b55ef4 commit 4107acf

File tree

1 file changed

+95
-39
lines changed

1 file changed

+95
-39
lines changed

graalpython/com.oracle.graal.python.cext/src/exceptions.c

Lines changed: 95 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -48,86 +48,142 @@ PyTypeObject _PyExc_BaseException = PY_TRUFFLE_TYPE("BaseException", &PyType_Typ
4848

4949
PyObject * PyExc_BaseException = NULL;
5050
PyObject * PyExc_Exception = NULL;
51+
PyObject * PyExc_StopAsyncIteration = NULL;
52+
PyObject * PyExc_StopIteration = NULL;
53+
PyObject * PyExc_GeneratorExit = NULL;
54+
PyObject * PyExc_ArithmeticError = NULL;
55+
PyObject * PyExc_LookupError = NULL;
56+
PyObject * PyExc_AssertionError = NULL;
5157
PyObject * PyExc_AttributeError = NULL;
58+
PyObject * PyExc_BufferError = NULL;
59+
PyObject * PyExc_EOFError = NULL;
5260
PyObject * PyExc_FloatingPointError = NULL;
5361
PyObject * PyExc_OSError = NULL;
5462
PyObject * PyExc_ImportError = NULL;
63+
PyObject * PyExc_ModuleNotFoundError = NULL;
5564
PyObject * PyExc_IndexError = NULL;
5665
PyObject * PyExc_KeyError = NULL;
66+
PyObject * PyExc_KeyboardInterrupt = NULL;
5767
PyObject * PyExc_MemoryError = NULL;
5868
PyObject * PyExc_NameError = NULL;
5969
PyObject * PyExc_OverflowError = NULL;
6070
PyObject * PyExc_RuntimeError = NULL;
71+
PyObject * PyExc_RecursionError = NULL;
72+
PyObject * PyExc_NotImplementedError = NULL;
73+
PyObject * PyExc_SyntaxError = NULL;
74+
PyObject * PyExc_IndentationError = NULL;
75+
PyObject * PyExc_TabError = NULL;
76+
PyObject * PyExc_ReferenceError = NULL;
6177
PyObject * PyExc_SystemError = NULL;
78+
PyObject * PyExc_SystemExit = NULL;
6279
PyObject * PyExc_TypeError = NULL;
80+
PyObject * PyExc_UnboundLocalError = NULL;
81+
PyObject * PyExc_UnicodeError = NULL;
82+
PyObject * PyExc_UnicodeEncodeError = NULL;
83+
PyObject * PyExc_UnicodeDecodeError = NULL;
84+
PyObject * PyExc_UnicodeTranslateError = NULL;
6385
PyObject * PyExc_ValueError = NULL;
86+
PyObject * PyExc_ZeroDivisionError = NULL;
87+
PyObject * PyExc_BlockingIOError = NULL;
88+
PyObject * PyExc_BrokenPipeError = NULL;
89+
PyObject * PyExc_ChildProcessError = NULL;
90+
PyObject * PyExc_ConnectionError = NULL;
91+
PyObject * PyExc_ConnectionAbortedError = NULL;
92+
PyObject * PyExc_ConnectionRefusedError = NULL;
93+
PyObject * PyExc_ConnectionResetError = NULL;
94+
PyObject * PyExc_FileExistsError = NULL;
95+
PyObject * PyExc_FileNotFoundError = NULL;
96+
PyObject * PyExc_InterruptedError = NULL;
97+
PyObject * PyExc_IsADirectoryError = NULL;
98+
PyObject * PyExc_NotADirectoryError = NULL;
99+
PyObject * PyExc_PermissionError = NULL;
100+
PyObject * PyExc_ProcessLookupError = NULL;
101+
PyObject * PyExc_TimeoutError = NULL;
102+
103+
PyObject * PyExc_EnvironmentError = NULL;
64104
PyObject * PyExc_IOError = NULL;
105+
65106
PyObject * PyExc_Warning = NULL;
66107
PyObject * PyExc_UserWarning = NULL;
67108
PyObject * PyExc_DeprecationWarning = NULL;
68-
PyObject * PyExc_RuntimeWarning = NULL;
69-
PyObject * PyExc_FutureWarning = NULL;
70109
PyObject * PyExc_PendingDeprecationWarning = NULL;
71110
PyObject * PyExc_SyntaxWarning = NULL;
72-
PyObject * PyExc_SyntaxError = NULL;
111+
PyObject * PyExc_RuntimeWarning = NULL;
112+
PyObject * PyExc_FutureWarning = NULL;
73113
PyObject * PyExc_ImportWarning = NULL;
74114
PyObject * PyExc_UnicodeWarning = NULL;
75115
PyObject * PyExc_BytesWarning = NULL;
76116
PyObject * PyExc_ResourceWarning = NULL;
77-
PyObject * PyExc_ZeroDivisionError = NULL;
78-
PyObject * PyExc_ArithmeticError = NULL;
79-
PyObject * PyExc_StopIteration = NULL;
80-
PyObject * PyExc_BufferError = NULL;
81-
PyObject * PyExc_AssertionError = NULL;
82-
PyObject * PyExc_UnboundLocalError = NULL;
83-
PyObject * PyExc_NotImplementedError = NULL;
84-
PyObject * PyExc_RecursionError = NULL;
85-
PyObject * PyExc_UnicodeEncodeError = NULL;
86-
PyObject * PyExc_GeneratorExit = NULL;
87-
PyObject * PyExc_EOFError = NULL;
88-
PyObject * PyExc_FileNotFoundError = NULL;
89117

90118
void initialize_exceptions() {
91-
PyExc_AttributeError = PY_EXCEPTION("AttributeError");
92-
PyExc_AssertionError = PY_EXCEPTION("AssertionError");
93119
PyExc_BaseException = PY_EXCEPTION("BaseException");
94-
PyExc_BytesWarning = PY_EXCEPTION("BytesWarning");
95-
PyExc_DeprecationWarning = PY_EXCEPTION("DeprecationWarning");
96120
PyExc_Exception = PY_EXCEPTION("Exception");
121+
PyExc_StopAsyncIteration = PY_EXCEPTION("StopAsyncIteration");
122+
PyExc_StopIteration = PY_EXCEPTION("StopIteration");
123+
PyExc_GeneratorExit = PY_EXCEPTION("GeneratorExit");
124+
PyExc_ArithmeticError = PY_EXCEPTION("ArithmeticError");
125+
PyExc_LookupError = PY_EXCEPTION("LookupError");
126+
PyExc_AssertionError = PY_EXCEPTION("AssertionError");
127+
PyExc_AttributeError = PY_EXCEPTION("AttributeError");
128+
PyExc_BufferError = PY_EXCEPTION("BufferError");
129+
PyExc_EOFError = PY_EXCEPTION("EOFError");
97130
PyExc_FloatingPointError = PY_EXCEPTION("FloatingPointError");
98-
PyExc_IOError = PY_EXCEPTION("IOError");
131+
PyExc_OSError = PY_EXCEPTION("OSError");
99132
PyExc_ImportError = PY_EXCEPTION("ImportError");
100-
PyExc_ImportWarning = PY_EXCEPTION("ImportWarning");
133+
PyExc_ModuleNotFoundError = PY_EXCEPTION("ModuleNotFoundError");
101134
PyExc_IndexError = PY_EXCEPTION("IndexError");
102135
PyExc_KeyError = PY_EXCEPTION("KeyError");
136+
PyExc_KeyboardInterrupt = PY_EXCEPTION("KeyboardInterrupt");
103137
PyExc_MemoryError = PY_EXCEPTION("MemoryError");
104138
PyExc_NameError = PY_EXCEPTION("NameError");
105-
PyExc_OSError = PY_EXCEPTION("OSError");
106139
PyExc_OverflowError = PY_EXCEPTION("OverflowError");
107-
PyExc_PendingDeprecationWarning = PY_EXCEPTION("PendingDeprecationWarning");
108-
PyExc_ResourceWarning = PY_EXCEPTION("ResourceWarning");
109140
PyExc_RuntimeError = PY_EXCEPTION("RuntimeError");
110-
PyExc_RuntimeWarning = PY_EXCEPTION("RuntimeWarning");
111-
PyExc_SyntaxWarning = PY_EXCEPTION("SyntaxWarning");
141+
PyExc_RecursionError = PY_EXCEPTION("RecursionError");
142+
PyExc_NotImplementedError = PY_EXCEPTION("NotImplementedError");
112143
PyExc_SyntaxError = PY_EXCEPTION("SyntaxError");
144+
PyExc_IndentationError = PY_EXCEPTION("IndentationError");
145+
PyExc_TabError = PY_EXCEPTION("TabError");
146+
PyExc_ReferenceError = PY_EXCEPTION("ReferenceError");
113147
PyExc_SystemError = PY_EXCEPTION("SystemError");
148+
PyExc_SystemExit = PY_EXCEPTION("SystemExit");
114149
PyExc_TypeError = PY_EXCEPTION("TypeError");
115-
PyExc_UnicodeWarning = PY_EXCEPTION("UnicodeWarning");
116-
PyExc_UserWarning = PY_EXCEPTION("UserWarning");
117-
PyExc_ValueError = PY_EXCEPTION("ValueError");
118-
PyExc_Warning = PY_EXCEPTION("Warning");
119-
PyExc_ZeroDivisionError = PY_EXCEPTION("ZeroDivisionError");
120-
PyExc_ArithmeticError = PY_EXCEPTION("ArithmeticError");
121-
PyExc_StopIteration = PY_EXCEPTION("StopIteration");
122-
PyExc_BufferError = PY_EXCEPTION("BufferError");
123150
PyExc_UnboundLocalError = PY_EXCEPTION("UnboundLocalError");
124-
PyExc_NotImplementedError = PY_EXCEPTION("NotImplementedError");
125-
PyExc_RecursionError = PY_EXCEPTION("RecursionError");
126-
PyExc_NotImplementedError = PY_EXCEPTION("NotImplementedError");
151+
PyExc_UnicodeError = PY_EXCEPTION("UnicodeError");
127152
PyExc_UnicodeEncodeError = PY_EXCEPTION("UnicodeEncodeError");
128-
PyExc_GeneratorExit = PY_EXCEPTION("GeneratorExit");
129-
PyExc_EOFError = PY_EXCEPTION("EOFError");
153+
PyExc_UnicodeDecodeError = PY_EXCEPTION("UnicodeDecodeError");
154+
PyExc_UnicodeTranslateError = PY_EXCEPTION("UnicodeTranslateError");
155+
PyExc_ValueError = PY_EXCEPTION("ValueError");
156+
PyExc_ZeroDivisionError = PY_EXCEPTION("ZeroDivisionError");
157+
PyExc_BlockingIOError = PY_EXCEPTION("BlockingIOError");
158+
PyExc_BrokenPipeError = PY_EXCEPTION("BrokenPipeError");
159+
PyExc_ChildProcessError = PY_EXCEPTION("ChildProcessError");
160+
PyExc_ConnectionError = PY_EXCEPTION("ConnectionError");
161+
PyExc_ConnectionAbortedError = PY_EXCEPTION("ConnectionAbortedError");
162+
PyExc_ConnectionRefusedError = PY_EXCEPTION("ConnectionRefusedError");
163+
PyExc_ConnectionResetError = PY_EXCEPTION("ConnectionResetError");
164+
PyExc_FileExistsError = PY_EXCEPTION("FileExistsError");
130165
PyExc_FileNotFoundError = PY_EXCEPTION("FileNotFoundError");
166+
PyExc_InterruptedError = PY_EXCEPTION("InterruptedError");
167+
PyExc_IsADirectoryError = PY_EXCEPTION("IsADirectoryError");
168+
PyExc_NotADirectoryError = PY_EXCEPTION("NotADirectoryError");
169+
PyExc_PermissionError = PY_EXCEPTION("PermissionError");
170+
PyExc_ProcessLookupError = PY_EXCEPTION("ProcessLookupError");
171+
PyExc_TimeoutError = PY_EXCEPTION("TimeoutError");
172+
173+
PyExc_EnvironmentError = PY_EXCEPTION("EnvironmentError");
174+
PyExc_IOError = PY_EXCEPTION("IOError");
175+
176+
PyExc_Warning = PY_EXCEPTION("Warning");
177+
PyExc_UserWarning = PY_EXCEPTION("UserWarning");
178+
PyExc_DeprecationWarning = PY_EXCEPTION("DeprecationWarning");
179+
PyExc_PendingDeprecationWarning = PY_EXCEPTION("PendingDeprecationWarning");
180+
PyExc_SyntaxWarning = PY_EXCEPTION("SyntaxWarning");
181+
PyExc_RuntimeWarning = PY_EXCEPTION("RuntimeWarning");
182+
PyExc_FutureWarning = PY_EXCEPTION("FutureWarning");
183+
PyExc_ImportWarning = PY_EXCEPTION("ImportWarning");
184+
PyExc_UnicodeWarning = PY_EXCEPTION("UnicodeWarning");
185+
PyExc_BytesWarning = PY_EXCEPTION("BytesWarning");
186+
PyExc_ResourceWarning = PY_EXCEPTION("ResourceWarning");
131187
}
132188

133189

0 commit comments

Comments
 (0)