7 /***********************************************************
8 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
13 Permission to use, copy, modify, and distribute this software and its
14 documentation for any purpose and without fee is hereby granted,
15 provided that the above copyright notice appear in all copies and that
16 both that copyright notice and this permission notice appear in
17 supporting documentation, and that the names of Stichting Mathematisch
18 Centrum or CWI not be used in advertising or publicity pertaining to
19 distribution of the software without specific, written prior permission.
21 STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
22 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
23 FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
24 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
25 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
26 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
27 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29 ******************************************************************/
31 /* Error handling definitions */
33 void PyErr_SetNone
Py_PROTO((PyObject
*));
34 void PyErr_SetObject
Py_PROTO((PyObject
*, PyObject
*));
35 void PyErr_SetString
Py_PROTO((PyObject
*, char *));
36 PyObject
*PyErr_Occurred
Py_PROTO((void));
37 void PyErr_Clear
Py_PROTO((void));
38 void PyErr_Fetch
Py_PROTO((PyObject
**, PyObject
**, PyObject
**));
39 void PyErr_Restore
Py_PROTO((PyObject
*, PyObject
*, PyObject
*));
41 /* Predefined exceptions */
43 extern DL_IMPORT PyObject
*PyExc_AccessError
;
44 extern DL_IMPORT PyObject
*PyExc_AttributeError
;
45 extern DL_IMPORT PyObject
*PyExc_ConflictError
;
46 extern DL_IMPORT PyObject
*PyExc_EOFError
;
47 extern DL_IMPORT PyObject
*PyExc_IOError
;
48 extern DL_IMPORT PyObject
*PyExc_ImportError
;
49 extern DL_IMPORT PyObject
*PyExc_IndexError
;
50 extern DL_IMPORT PyObject
*PyExc_KeyError
;
51 extern DL_IMPORT PyObject
*PyExc_KeyboardInterrupt
;
52 extern DL_IMPORT PyObject
*PyExc_MemoryError
;
53 extern DL_IMPORT PyObject
*PyExc_NameError
;
54 extern DL_IMPORT PyObject
*PyExc_OverflowError
;
55 extern DL_IMPORT PyObject
*PyExc_RuntimeError
;
56 extern DL_IMPORT PyObject
*PyExc_SyntaxError
;
57 extern DL_IMPORT PyObject
*PyExc_SystemError
;
58 extern DL_IMPORT PyObject
*PyExc_SystemExit
;
59 extern DL_IMPORT PyObject
*PyExc_TypeError
;
60 extern DL_IMPORT PyObject
*PyExc_ValueError
;
61 extern DL_IMPORT PyObject
*PyExc_ZeroDivisionError
;
63 /* Convenience functions */
65 extern int PyErr_BadArgument
Py_PROTO((void));
66 extern PyObject
*PyErr_NoMemory
Py_PROTO((void));
67 extern PyObject
*PyErr_SetFromErrno
Py_PROTO((PyObject
*));
69 extern void PyErr_BadInternalCall
Py_PROTO((void));
71 extern int sigcheck
Py_PROTO((void)); /* In sigcheck.c or signalmodule.c */
76 #endif /* !Py_ERRORS_H */