Mercurial > cpython-lru_cache-weakref
annotate Include/pyerrors.h @ 13778:f6e4a9dd67cd legacy-trunk
Rename the "parser" package to "parsers" to be compatible with the PyXML
project.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 31 Jul 2000 23:59:54 +0000 |
| parents | 7e3cd9480f66 |
| children | 019265b3a856 |
| rev | line source |
|---|---|
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
1 #ifndef Py_ERRORS_H |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
2 #define Py_ERRORS_H |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
3 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
4 extern "C" { |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
5 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
6 |
| 145 | 7 /*********************************************************** |
|
13255
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11963
diff
changeset
|
8 Copyright (c) 2000, BeOpen.com. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11963
diff
changeset
|
9 Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11963
diff
changeset
|
10 Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11963
diff
changeset
|
11 All rights reserved. |
| 145 | 12 |
|
13255
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11963
diff
changeset
|
13 See the file "Misc/COPYRIGHT" for information on usage and |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11963
diff
changeset
|
14 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 145 | 15 ******************************************************************/ |
| 16 | |
| 6 | 17 /* Error handling definitions */ |
| 18 | |
|
13435
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
19 DL_IMPORT(void) PyErr_SetNone(PyObject *); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
20 DL_IMPORT(void) PyErr_SetObject(PyObject *, PyObject *); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
21 DL_IMPORT(void) PyErr_SetString(PyObject *, const char *); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
22 DL_IMPORT(PyObject *) PyErr_Occurred(void); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
23 DL_IMPORT(void) PyErr_Clear(void); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
24 DL_IMPORT(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
25 DL_IMPORT(void) PyErr_Restore(PyObject *, PyObject *, PyObject *); |
| 6 | 26 |
|
6146
a2a1df0ca808
Three new C API functions:
Barry Warsaw <barry@python.org>
parents:
5230
diff
changeset
|
27 /* Error testing and normalization */ |
|
13435
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
28 DL_IMPORT(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
29 DL_IMPORT(int) PyErr_ExceptionMatches(PyObject *); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
30 DL_IMPORT(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); |
|
6146
a2a1df0ca808
Three new C API functions:
Barry Warsaw <barry@python.org>
parents:
5230
diff
changeset
|
31 |
|
a2a1df0ca808
Three new C API functions:
Barry Warsaw <barry@python.org>
parents:
5230
diff
changeset
|
32 |
| 86 | 33 /* Predefined exceptions */ |
|
10
a71e896ed047
Made exception objects extern.
Guido van Rossum <guido@python.org>
parents:
6
diff
changeset
|
34 |
|
6318
cdc5a40fcf97
Introduce PyExc_Exception as the conceptual root class for all exceptions.
Guido van Rossum <guido@python.org>
parents:
6191
diff
changeset
|
35 extern DL_IMPORT(PyObject *) PyExc_Exception; |
|
6191
3a6b7a377dc3
Added externs for three new exceptions PyExc_StandardError,
Barry Warsaw <barry@python.org>
parents:
6146
diff
changeset
|
36 extern DL_IMPORT(PyObject *) PyExc_StandardError; |
|
6323
3f8d7f74f1bc
[Py_Exc]NumberError => [Py_Exc]ArithmeticError
Barry Warsaw <barry@python.org>
parents:
6318
diff
changeset
|
37 extern DL_IMPORT(PyObject *) PyExc_ArithmeticError; |
|
6191
3a6b7a377dc3
Added externs for three new exceptions PyExc_StandardError,
Barry Warsaw <barry@python.org>
parents:
6146
diff
changeset
|
38 extern DL_IMPORT(PyObject *) PyExc_LookupError; |
|
3a6b7a377dc3
Added externs for three new exceptions PyExc_StandardError,
Barry Warsaw <barry@python.org>
parents:
6146
diff
changeset
|
39 |
| 5230 | 40 extern DL_IMPORT(PyObject *) PyExc_AssertionError; |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
41 extern DL_IMPORT(PyObject *) PyExc_AttributeError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
42 extern DL_IMPORT(PyObject *) PyExc_EOFError; |
|
5117
2bb0bda1585c
Changes for Lee Busby's SIGFPE patch set.
Guido van Rossum <guido@python.org>
parents:
5106
diff
changeset
|
43 extern DL_IMPORT(PyObject *) PyExc_FloatingPointError; |
|
8703
50757465fa70
New global variables: PyExc_EnvironmentError and PyExc_OSError
Barry Warsaw <barry@python.org>
parents:
6324
diff
changeset
|
44 extern DL_IMPORT(PyObject *) PyExc_EnvironmentError; |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
45 extern DL_IMPORT(PyObject *) PyExc_IOError; |
|
8703
50757465fa70
New global variables: PyExc_EnvironmentError and PyExc_OSError
Barry Warsaw <barry@python.org>
parents:
6324
diff
changeset
|
46 extern DL_IMPORT(PyObject *) PyExc_OSError; |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
47 extern DL_IMPORT(PyObject *) PyExc_ImportError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
48 extern DL_IMPORT(PyObject *) PyExc_IndexError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
49 extern DL_IMPORT(PyObject *) PyExc_KeyError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
50 extern DL_IMPORT(PyObject *) PyExc_KeyboardInterrupt; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
51 extern DL_IMPORT(PyObject *) PyExc_MemoryError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
52 extern DL_IMPORT(PyObject *) PyExc_NameError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
53 extern DL_IMPORT(PyObject *) PyExc_OverflowError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
54 extern DL_IMPORT(PyObject *) PyExc_RuntimeError; |
|
9564
d13a60b44b45
Added PyExc_NotImplementedError
Barry Warsaw <barry@python.org>
parents:
8703
diff
changeset
|
55 extern DL_IMPORT(PyObject *) PyExc_NotImplementedError; |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
56 extern DL_IMPORT(PyObject *) PyExc_SyntaxError; |
|
13435
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
57 extern DL_IMPORT(PyObject *) PyExc_IndentationError; |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
58 extern DL_IMPORT(PyObject *) PyExc_TabError; |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
59 extern DL_IMPORT(PyObject *) PyExc_SystemError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
60 extern DL_IMPORT(PyObject *) PyExc_SystemExit; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
61 extern DL_IMPORT(PyObject *) PyExc_TypeError; |
| 11030 | 62 extern DL_IMPORT(PyObject *) PyExc_UnboundLocalError; |
|
11963
24199c1b9182
Marc-Andre Lemburg: add PyExc_UnicodeError
Guido van Rossum <guido@python.org>
parents:
11799
diff
changeset
|
63 extern DL_IMPORT(PyObject *) PyExc_UnicodeError; |
|
2436
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
64 extern DL_IMPORT(PyObject *) PyExc_ValueError; |
|
fa98dda07877
make the type a parameter of the DL_IMPORT macro, for Borland C
Guido van Rossum <guido@python.org>
parents:
2146
diff
changeset
|
65 extern DL_IMPORT(PyObject *) PyExc_ZeroDivisionError; |
|
11799
3678dd685867
Declarations related to new WindowsError exception.
Guido van Rossum <guido@python.org>
parents:
11030
diff
changeset
|
66 #ifdef MS_WINDOWS |
|
3678dd685867
Declarations related to new WindowsError exception.
Guido van Rossum <guido@python.org>
parents:
11030
diff
changeset
|
67 extern DL_IMPORT(PyObject *) PyExc_WindowsError; |
|
3678dd685867
Declarations related to new WindowsError exception.
Guido van Rossum <guido@python.org>
parents:
11030
diff
changeset
|
68 #endif |
|
23
08562de01668
Added err_badcall() and planned new errors.
Guido van Rossum <guido@python.org>
parents:
10
diff
changeset
|
69 |
|
6191
3a6b7a377dc3
Added externs for three new exceptions PyExc_StandardError,
Barry Warsaw <barry@python.org>
parents:
6146
diff
changeset
|
70 extern DL_IMPORT(PyObject *) PyExc_MemoryErrorInst; |
|
3a6b7a377dc3
Added externs for three new exceptions PyExc_StandardError,
Barry Warsaw <barry@python.org>
parents:
6146
diff
changeset
|
71 |
|
3a6b7a377dc3
Added externs for three new exceptions PyExc_StandardError,
Barry Warsaw <barry@python.org>
parents:
6146
diff
changeset
|
72 |
|
10
a71e896ed047
Made exception objects extern.
Guido van Rossum <guido@python.org>
parents:
6
diff
changeset
|
73 /* Convenience functions */ |
|
a71e896ed047
Made exception objects extern.
Guido van Rossum <guido@python.org>
parents:
6
diff
changeset
|
74 |
|
13435
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
75 extern DL_IMPORT(int) PyErr_BadArgument(void); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
76 extern DL_IMPORT(PyObject *) PyErr_NoMemory(void); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
77 extern DL_IMPORT(PyObject *) PyErr_SetFromErrno(PyObject *); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
78 extern DL_IMPORT(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
79 extern DL_IMPORT(PyObject *) PyErr_Format(PyObject *, const char *, ...); |
|
11799
3678dd685867
Declarations related to new WindowsError exception.
Guido van Rossum <guido@python.org>
parents:
11030
diff
changeset
|
80 #ifdef MS_WINDOWS |
|
3678dd685867
Declarations related to new WindowsError exception.
Guido van Rossum <guido@python.org>
parents:
11030
diff
changeset
|
81 extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErrWithFilename(int, const char *); |
|
3678dd685867
Declarations related to new WindowsError exception.
Guido van Rossum <guido@python.org>
parents:
11030
diff
changeset
|
82 extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErr(int); |
|
3678dd685867
Declarations related to new WindowsError exception.
Guido van Rossum <guido@python.org>
parents:
11030
diff
changeset
|
83 #endif |
|
23
08562de01668
Added err_badcall() and planned new errors.
Guido van Rossum <guido@python.org>
parents:
10
diff
changeset
|
84 |
|
13435
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
85 extern DL_IMPORT(void) PyErr_BadInternalCall(void); |
|
1288
9fed5726a36d
Several changes in one:
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
86 |
|
6324
20b5647a067e
New API PyErr_NewException(name, base, dict) to create simple new exceptions.
Guido van Rossum <guido@python.org>
parents:
6323
diff
changeset
|
87 /* Function to create a new exception */ |
|
13435
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
88 DL_IMPORT(PyObject *) PyErr_NewException(char *name, PyObject *base, |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
89 PyObject *dict); |
|
6324
20b5647a067e
New API PyErr_NewException(name, base, dict) to create simple new exceptions.
Guido van Rossum <guido@python.org>
parents:
6323
diff
changeset
|
90 |
|
4864
a53908d09a04
Added declaration for PyErr_SetInterrupt.
Barry Warsaw <barry@python.org>
parents:
4654
diff
changeset
|
91 /* In sigcheck.c or signalmodule.c */ |
|
13435
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
92 extern DL_IMPORT(int) PyErr_CheckSignals(void); |
|
7e3cd9480f66
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
93 extern DL_IMPORT(void) PyErr_SetInterrupt(void); |
|
4864
a53908d09a04
Added declaration for PyErr_SetInterrupt.
Barry Warsaw <barry@python.org>
parents:
4654
diff
changeset
|
94 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1329
diff
changeset
|
95 |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
96 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
97 } |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
98 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1288
diff
changeset
|
99 #endif /* !Py_ERRORS_H */ |
