Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python2....
File: pyerrors.h
#ifndef Py_ERRORS_H
[0] Fix | Delete
#define Py_ERRORS_H
[1] Fix | Delete
#ifdef __cplusplus
[2] Fix | Delete
extern "C" {
[3] Fix | Delete
#endif
[4] Fix | Delete
[5] Fix | Delete
/* Error objects */
[6] Fix | Delete
[7] Fix | Delete
typedef struct {
[8] Fix | Delete
PyObject_HEAD
[9] Fix | Delete
PyObject *dict;
[10] Fix | Delete
PyObject *args;
[11] Fix | Delete
PyObject *message;
[12] Fix | Delete
} PyBaseExceptionObject;
[13] Fix | Delete
[14] Fix | Delete
typedef struct {
[15] Fix | Delete
PyObject_HEAD
[16] Fix | Delete
PyObject *dict;
[17] Fix | Delete
PyObject *args;
[18] Fix | Delete
PyObject *message;
[19] Fix | Delete
PyObject *msg;
[20] Fix | Delete
PyObject *filename;
[21] Fix | Delete
PyObject *lineno;
[22] Fix | Delete
PyObject *offset;
[23] Fix | Delete
PyObject *text;
[24] Fix | Delete
PyObject *print_file_and_line;
[25] Fix | Delete
} PySyntaxErrorObject;
[26] Fix | Delete
[27] Fix | Delete
#ifdef Py_USING_UNICODE
[28] Fix | Delete
typedef struct {
[29] Fix | Delete
PyObject_HEAD
[30] Fix | Delete
PyObject *dict;
[31] Fix | Delete
PyObject *args;
[32] Fix | Delete
PyObject *message;
[33] Fix | Delete
PyObject *encoding;
[34] Fix | Delete
PyObject *object;
[35] Fix | Delete
Py_ssize_t start;
[36] Fix | Delete
Py_ssize_t end;
[37] Fix | Delete
PyObject *reason;
[38] Fix | Delete
} PyUnicodeErrorObject;
[39] Fix | Delete
#endif
[40] Fix | Delete
[41] Fix | Delete
typedef struct {
[42] Fix | Delete
PyObject_HEAD
[43] Fix | Delete
PyObject *dict;
[44] Fix | Delete
PyObject *args;
[45] Fix | Delete
PyObject *message;
[46] Fix | Delete
PyObject *code;
[47] Fix | Delete
} PySystemExitObject;
[48] Fix | Delete
[49] Fix | Delete
typedef struct {
[50] Fix | Delete
PyObject_HEAD
[51] Fix | Delete
PyObject *dict;
[52] Fix | Delete
PyObject *args;
[53] Fix | Delete
PyObject *message;
[54] Fix | Delete
PyObject *myerrno;
[55] Fix | Delete
PyObject *strerror;
[56] Fix | Delete
PyObject *filename;
[57] Fix | Delete
} PyEnvironmentErrorObject;
[58] Fix | Delete
[59] Fix | Delete
#ifdef MS_WINDOWS
[60] Fix | Delete
typedef struct {
[61] Fix | Delete
PyObject_HEAD
[62] Fix | Delete
PyObject *dict;
[63] Fix | Delete
PyObject *args;
[64] Fix | Delete
PyObject *message;
[65] Fix | Delete
PyObject *myerrno;
[66] Fix | Delete
PyObject *strerror;
[67] Fix | Delete
PyObject *filename;
[68] Fix | Delete
PyObject *winerror;
[69] Fix | Delete
} PyWindowsErrorObject;
[70] Fix | Delete
#endif
[71] Fix | Delete
[72] Fix | Delete
/* Error handling definitions */
[73] Fix | Delete
[74] Fix | Delete
PyAPI_FUNC(void) PyErr_SetNone(PyObject *);
[75] Fix | Delete
PyAPI_FUNC(void) PyErr_SetObject(PyObject *, PyObject *);
[76] Fix | Delete
PyAPI_FUNC(void) PyErr_SetString(PyObject *, const char *);
[77] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_Occurred(void);
[78] Fix | Delete
PyAPI_FUNC(void) PyErr_Clear(void);
[79] Fix | Delete
PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **);
[80] Fix | Delete
PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *);
[81] Fix | Delete
[82] Fix | Delete
#ifdef Py_DEBUG
[83] Fix | Delete
#define _PyErr_OCCURRED() PyErr_Occurred()
[84] Fix | Delete
#else
[85] Fix | Delete
#define _PyErr_OCCURRED() (_PyThreadState_Current->curexc_type)
[86] Fix | Delete
#endif
[87] Fix | Delete
[88] Fix | Delete
/* Error testing and normalization */
[89] Fix | Delete
PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *);
[90] Fix | Delete
PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *);
[91] Fix | Delete
PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
[92] Fix | Delete
PyAPI_FUNC(void) _PyErr_ReplaceException(PyObject *, PyObject *, PyObject *);
[93] Fix | Delete
[94] Fix | Delete
/* */
[95] Fix | Delete
[96] Fix | Delete
#define PyExceptionClass_Check(x) \
[97] Fix | Delete
(PyClass_Check((x)) || (PyType_Check((x)) && \
[98] Fix | Delete
PyType_FastSubclass((PyTypeObject*)(x), Py_TPFLAGS_BASE_EXC_SUBCLASS)))
[99] Fix | Delete
[100] Fix | Delete
#define PyExceptionInstance_Check(x) \
[101] Fix | Delete
(PyInstance_Check((x)) || \
[102] Fix | Delete
PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS))
[103] Fix | Delete
[104] Fix | Delete
#define PyExceptionClass_Name(x) \
[105] Fix | Delete
(PyClass_Check((x)) \
[106] Fix | Delete
? PyString_AS_STRING(((PyClassObject*)(x))->cl_name) \
[107] Fix | Delete
: (char *)(((PyTypeObject*)(x))->tp_name))
[108] Fix | Delete
[109] Fix | Delete
#define PyExceptionInstance_Class(x) \
[110] Fix | Delete
((PyInstance_Check((x)) \
[111] Fix | Delete
? (PyObject*)((PyInstanceObject*)(x))->in_class \
[112] Fix | Delete
: (PyObject*)((x)->ob_type)))
[113] Fix | Delete
[114] Fix | Delete
[115] Fix | Delete
/* Predefined exceptions */
[116] Fix | Delete
[117] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_BaseException;
[118] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_Exception;
[119] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_StopIteration;
[120] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_GeneratorExit;
[121] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_StandardError;
[122] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_ArithmeticError;
[123] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_LookupError;
[124] Fix | Delete
[125] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_AssertionError;
[126] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_AttributeError;
[127] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_EOFError;
[128] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_FloatingPointError;
[129] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_EnvironmentError;
[130] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_IOError;
[131] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_OSError;
[132] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_ImportError;
[133] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_IndexError;
[134] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_KeyError;
[135] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_KeyboardInterrupt;
[136] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_MemoryError;
[137] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_NameError;
[138] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_OverflowError;
[139] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_RuntimeError;
[140] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
[141] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_SyntaxError;
[142] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_IndentationError;
[143] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_TabError;
[144] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_ReferenceError;
[145] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_SystemError;
[146] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_SystemExit;
[147] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_TypeError;
[148] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_UnboundLocalError;
[149] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_UnicodeError;
[150] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_UnicodeEncodeError;
[151] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_UnicodeDecodeError;
[152] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_UnicodeTranslateError;
[153] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_ValueError;
[154] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_ZeroDivisionError;
[155] Fix | Delete
#ifdef MS_WINDOWS
[156] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_WindowsError;
[157] Fix | Delete
#endif
[158] Fix | Delete
#ifdef __VMS
[159] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_VMSError;
[160] Fix | Delete
#endif
[161] Fix | Delete
[162] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_BufferError;
[163] Fix | Delete
[164] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_MemoryErrorInst;
[165] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_RecursionErrorInst;
[166] Fix | Delete
[167] Fix | Delete
/* Predefined warning categories */
[168] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_Warning;
[169] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_UserWarning;
[170] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_DeprecationWarning;
[171] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_PendingDeprecationWarning;
[172] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_SyntaxWarning;
[173] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_RuntimeWarning;
[174] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_FutureWarning;
[175] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_ImportWarning;
[176] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_UnicodeWarning;
[177] Fix | Delete
PyAPI_DATA(PyObject *) PyExc_BytesWarning;
[178] Fix | Delete
[179] Fix | Delete
[180] Fix | Delete
/* Convenience functions */
[181] Fix | Delete
[182] Fix | Delete
PyAPI_FUNC(int) PyErr_BadArgument(void);
[183] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_NoMemory(void);
[184] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
[185] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
[186] Fix | Delete
PyObject *, PyObject *);
[187] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(
[188] Fix | Delete
PyObject *, const char *);
[189] Fix | Delete
#ifdef MS_WINDOWS
[190] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
[191] Fix | Delete
PyObject *, const Py_UNICODE *);
[192] Fix | Delete
#endif /* MS_WINDOWS */
[193] Fix | Delete
[194] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...)
[195] Fix | Delete
Py_GCC_ATTRIBUTE((format(printf, 2, 3)));
[196] Fix | Delete
[197] Fix | Delete
#ifdef MS_WINDOWS
[198] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(
[199] Fix | Delete
int, const char *);
[200] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
[201] Fix | Delete
int, const char *);
[202] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename(
[203] Fix | Delete
int, const Py_UNICODE *);
[204] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
[205] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
[206] Fix | Delete
PyObject *,int, PyObject *);
[207] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
[208] Fix | Delete
PyObject *,int, const char *);
[209] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename(
[210] Fix | Delete
PyObject *,int, const Py_UNICODE *);
[211] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
[212] Fix | Delete
#endif /* MS_WINDOWS */
[213] Fix | Delete
[214] Fix | Delete
/* Export the old function so that the existing API remains available: */
[215] Fix | Delete
PyAPI_FUNC(void) PyErr_BadInternalCall(void);
[216] Fix | Delete
PyAPI_FUNC(void) _PyErr_BadInternalCall(const char *filename, int lineno);
[217] Fix | Delete
/* Mask the old API with a call to the new API for code compiled under
[218] Fix | Delete
Python 2.0: */
[219] Fix | Delete
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
[220] Fix | Delete
[221] Fix | Delete
/* Function to create a new exception */
[222] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_NewException(
[223] Fix | Delete
char *name, PyObject *base, PyObject *dict);
[224] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_NewExceptionWithDoc(
[225] Fix | Delete
char *name, char *doc, PyObject *base, PyObject *dict);
[226] Fix | Delete
PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *);
[227] Fix | Delete
[228] Fix | Delete
/* In sigcheck.c or signalmodule.c */
[229] Fix | Delete
PyAPI_FUNC(int) PyErr_CheckSignals(void);
[230] Fix | Delete
PyAPI_FUNC(void) PyErr_SetInterrupt(void);
[231] Fix | Delete
[232] Fix | Delete
/* In signalmodule.c */
[233] Fix | Delete
int PySignal_SetWakeupFd(int fd);
[234] Fix | Delete
[235] Fix | Delete
/* Support for adding program text to SyntaxErrors */
[236] Fix | Delete
PyAPI_FUNC(void) PyErr_SyntaxLocation(const char *, int);
[237] Fix | Delete
PyAPI_FUNC(PyObject *) PyErr_ProgramText(const char *, int);
[238] Fix | Delete
[239] Fix | Delete
#ifdef Py_USING_UNICODE
[240] Fix | Delete
/* The following functions are used to create and modify unicode
[241] Fix | Delete
exceptions from C */
[242] Fix | Delete
[243] Fix | Delete
/* create a UnicodeDecodeError object */
[244] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_Create(
[245] Fix | Delete
const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
[246] Fix | Delete
[247] Fix | Delete
/* create a UnicodeEncodeError object */
[248] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_Create(
[249] Fix | Delete
const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
[250] Fix | Delete
[251] Fix | Delete
/* create a UnicodeTranslateError object */
[252] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_Create(
[253] Fix | Delete
const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
[254] Fix | Delete
[255] Fix | Delete
/* get the encoding attribute */
[256] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetEncoding(PyObject *);
[257] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetEncoding(PyObject *);
[258] Fix | Delete
[259] Fix | Delete
/* get the object attribute */
[260] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetObject(PyObject *);
[261] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetObject(PyObject *);
[262] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetObject(PyObject *);
[263] Fix | Delete
[264] Fix | Delete
/* get the value of the start attribute (the int * may not be NULL)
[265] Fix | Delete
return 0 on success, -1 on failure */
[266] Fix | Delete
PyAPI_FUNC(int) PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *);
[267] Fix | Delete
PyAPI_FUNC(int) PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *);
[268] Fix | Delete
PyAPI_FUNC(int) PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *);
[269] Fix | Delete
[270] Fix | Delete
/* assign a new value to the start attribute
[271] Fix | Delete
return 0 on success, -1 on failure */
[272] Fix | Delete
PyAPI_FUNC(int) PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t);
[273] Fix | Delete
PyAPI_FUNC(int) PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t);
[274] Fix | Delete
PyAPI_FUNC(int) PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t);
[275] Fix | Delete
[276] Fix | Delete
/* get the value of the end attribute (the int *may not be NULL)
[277] Fix | Delete
return 0 on success, -1 on failure */
[278] Fix | Delete
PyAPI_FUNC(int) PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *);
[279] Fix | Delete
PyAPI_FUNC(int) PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *);
[280] Fix | Delete
PyAPI_FUNC(int) PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *);
[281] Fix | Delete
[282] Fix | Delete
/* assign a new value to the end attribute
[283] Fix | Delete
return 0 on success, -1 on failure */
[284] Fix | Delete
PyAPI_FUNC(int) PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t);
[285] Fix | Delete
PyAPI_FUNC(int) PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t);
[286] Fix | Delete
PyAPI_FUNC(int) PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t);
[287] Fix | Delete
[288] Fix | Delete
/* get the value of the reason attribute */
[289] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetReason(PyObject *);
[290] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetReason(PyObject *);
[291] Fix | Delete
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetReason(PyObject *);
[292] Fix | Delete
[293] Fix | Delete
/* assign a new value to the reason attribute
[294] Fix | Delete
return 0 on success, -1 on failure */
[295] Fix | Delete
PyAPI_FUNC(int) PyUnicodeEncodeError_SetReason(
[296] Fix | Delete
PyObject *, const char *);
[297] Fix | Delete
PyAPI_FUNC(int) PyUnicodeDecodeError_SetReason(
[298] Fix | Delete
PyObject *, const char *);
[299] Fix | Delete
PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
[300] Fix | Delete
PyObject *, const char *);
[301] Fix | Delete
#endif
[302] Fix | Delete
[303] Fix | Delete
[304] Fix | Delete
/* These APIs aren't really part of the error implementation, but
[305] Fix | Delete
often needed to format error messages; the native C lib APIs are
[306] Fix | Delete
not available on all platforms, which is why we provide emulations
[307] Fix | Delete
for those platforms in Python/mysnprintf.c,
[308] Fix | Delete
WARNING: The return value of snprintf varies across platforms; do
[309] Fix | Delete
not rely on any particular behavior; eventually the C99 defn may
[310] Fix | Delete
be reliable.
[311] Fix | Delete
*/
[312] Fix | Delete
#if defined(MS_WIN32) && !defined(HAVE_SNPRINTF)
[313] Fix | Delete
# define HAVE_SNPRINTF
[314] Fix | Delete
# define snprintf _snprintf
[315] Fix | Delete
# define vsnprintf _vsnprintf
[316] Fix | Delete
#endif
[317] Fix | Delete
[318] Fix | Delete
#include <stdarg.h>
[319] Fix | Delete
PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
[320] Fix | Delete
Py_GCC_ATTRIBUTE((format(printf, 3, 4)));
[321] Fix | Delete
PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
[322] Fix | Delete
Py_GCC_ATTRIBUTE((format(printf, 3, 0)));
[323] Fix | Delete
[324] Fix | Delete
#ifdef __cplusplus
[325] Fix | Delete
}
[326] Fix | Delete
#endif
[327] Fix | Delete
#endif /* !Py_ERRORS_H */
[328] Fix | Delete
[329] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function