Lines Matching defs:exc
658 static void wrong_exception_type(PyObject *exc)
662 Py_TYPE(exc)->tp_name);
665 PyObject *PyCodec_StrictErrors(PyObject *exc)
667 if (PyExceptionInstance_Check(exc))
668 PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
675 PyObject *PyCodec_IgnoreErrors(PyObject *exc)
679 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
680 if (PyUnicodeEncodeError_GetEnd(exc, &end))
683 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
684 if (PyUnicodeDecodeError_GetEnd(exc, &end))
687 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) {
688 if (PyUnicodeTranslateError_GetEnd(exc, &end))
692 wrong_exception_type(exc);
699 PyObject *PyCodec_ReplaceErrors(PyObject *exc)
703 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
706 if (PyUnicodeEncodeError_GetStart(exc, &start))
708 if (PyUnicodeEncodeError_GetEnd(exc, &end))
721 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
722 if (PyUnicodeDecodeError_GetEnd(exc, &end))
728 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) {
731 if (PyUnicodeTranslateError_GetStart(exc, &start))
733 if (PyUnicodeTranslateError_GetEnd(exc, &end))
747 wrong_exception_type(exc);
752 PyObject *PyCodec_XMLCharRefReplaceErrors(PyObject *exc)
754 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
764 if (PyUnicodeEncodeError_GetStart(exc, &start))
766 if (PyUnicodeEncodeError_GetEnd(exc, &end))
768 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
845 wrong_exception_type(exc);
850 PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
861 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
863 if (PyUnicodeDecodeError_GetStart(exc, &start))
865 if (PyUnicodeDecodeError_GetEnd(exc, &end))
867 if (!(object = PyUnicodeDecodeError_GetObject(exc)))
888 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
889 if (PyUnicodeEncodeError_GetStart(exc, &start))
891 if (PyUnicodeEncodeError_GetEnd(exc, &end))
893 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
896 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) {
897 if (PyUnicodeTranslateError_GetStart(exc, &start))
899 if (PyUnicodeTranslateError_GetEnd(exc, &end))
901 if (!(object = PyUnicodeTranslateError_GetObject(exc)))
905 wrong_exception_type(exc);
959 PyObject *PyCodec_NameReplaceErrors(PyObject *exc)
961 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
973 if (PyUnicodeEncodeError_GetStart(exc, &start))
975 if (PyUnicodeEncodeError_GetEnd(exc, &end))
977 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
1048 wrong_exception_type(exc);
1122 PyCodec_SurrogatePassErrors(PyObject *exc)
1135 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
1137 if (PyUnicodeEncodeError_GetStart(exc, &start))
1139 if (PyUnicodeEncodeError_GetEnd(exc, &end))
1141 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
1143 if (!(encode = PyUnicodeEncodeError_GetEncoding(exc))) {
1156 PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
1174 PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
1212 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
1215 if (PyUnicodeDecodeError_GetStart(exc, &start))
1217 if (PyUnicodeDecodeError_GetEnd(exc, &end))
1219 if (!(object = PyUnicodeDecodeError_GetObject(exc)))
1222 if (!(encode = PyUnicodeDecodeError_GetEncoding(exc))) {
1235 PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
1271 PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
1280 wrong_exception_type(exc);
1286 PyCodec_SurrogateEscapeErrors(PyObject *exc)
1295 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
1297 if (PyUnicodeEncodeError_GetStart(exc, &start))
1299 if (PyUnicodeEncodeError_GetEnd(exc, &end))
1301 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
1314 PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
1326 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
1331 if (PyUnicodeDecodeError_GetStart(exc, &start))
1333 if (PyUnicodeDecodeError_GetEnd(exc, &end))
1335 if (!(object = PyUnicodeDecodeError_GetObject(exc)))
1348 PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
1357 wrong_exception_type(exc);
1363 static PyObject *strict_errors(PyObject *self, PyObject *exc)
1365 return PyCodec_StrictErrors(exc);
1369 static PyObject *ignore_errors(PyObject *self, PyObject *exc)
1371 return PyCodec_IgnoreErrors(exc);
1375 static PyObject *replace_errors(PyObject *self, PyObject *exc)
1377 return PyCodec_ReplaceErrors(exc);
1381 static PyObject *xmlcharrefreplace_errors(PyObject *self, PyObject *exc)
1383 return PyCodec_XMLCharRefReplaceErrors(exc);
1387 static PyObject *backslashreplace_errors(PyObject *self, PyObject *exc)
1389 return PyCodec_BackslashReplaceErrors(exc);
1392 static PyObject *namereplace_errors(PyObject *self, PyObject *exc)
1394 return PyCodec_NameReplaceErrors(exc);
1397 static PyObject *surrogatepass_errors(PyObject *self, PyObject *exc)
1399 return PyCodec_SurrogatePassErrors(exc);
1402 static PyObject *surrogateescape_errors(PyObject *self, PyObject *exc)
1404 return PyCodec_SurrogateEscapeErrors(exc);