summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/pyerrors.h68
1 files changed, 66 insertions, 2 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index edf3efd..6fa6ed7 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -4,6 +4,72 @@
extern "C" {
#endif
+/* Error objects */
+
+typedef struct {
+ PyObject_HEAD
+ PyObject *dict;
+ PyObject *args;
+ PyObject *message;
+} PyBaseExceptionObject;
+
+typedef struct {
+ PyObject_HEAD
+ PyObject *dict;
+ PyObject *args;
+ PyObject *message;
+ PyObject *msg;
+ PyObject *filename;
+ PyObject *lineno;
+ PyObject *offset;
+ PyObject *text;
+ PyObject *print_file_and_line;
+} PySyntaxErrorObject;
+
+#ifdef Py_USING_UNICODE
+typedef struct {
+ PyObject_HEAD
+ PyObject *dict;
+ PyObject *args;
+ PyObject *message;
+ PyObject *encoding;
+ PyObject *object;
+ PyObject *start;
+ PyObject *end;
+ PyObject *reason;
+} PyUnicodeErrorObject;
+#endif
+
+typedef struct {
+ PyObject_HEAD
+ PyObject *dict;
+ PyObject *args;
+ PyObject *message;
+ PyObject *code;
+} PySystemExitObject;
+
+typedef struct {
+ PyObject_HEAD
+ PyObject *dict;
+ PyObject *args;
+ PyObject *message;
+ PyObject *myerrno;
+ PyObject *strerror;
+ PyObject *filename;
+} PyEnvironmentErrorObject;
+
+#ifdef MS_WINDOWS
+typedef struct {
+ PyObject_HEAD
+ PyObject *dict;
+ PyObject *args;
+ PyObject *message;
+ PyObject *myerrno;
+ PyObject *strerror;
+ PyObject *filename;
+ PyObject *winerror;
+} PyWindowsErrorObject;
+#endif
/* Error handling definitions */
@@ -104,8 +170,6 @@ PyAPI_DATA(PyObject *) PyExc_UserWarning;
PyAPI_DATA(PyObject *) PyExc_DeprecationWarning;
PyAPI_DATA(PyObject *) PyExc_PendingDeprecationWarning;
PyAPI_DATA(PyObject *) PyExc_SyntaxWarning;
-/* PyExc_OverflowWarning will go away for Python 2.5 */
-PyAPI_DATA(PyObject *) PyExc_OverflowWarning;
PyAPI_DATA(PyObject *) PyExc_RuntimeWarning;
PyAPI_DATA(PyObject *) PyExc_FutureWarning;
PyAPI_DATA(PyObject *) PyExc_ImportWarning;