Lines Matching refs:exc
597 static void wrong_exception_type(PyObject *exc) in wrong_exception_type() argument
599 PyObject *type = PyObject_GetAttrString(exc, "__class__"); in wrong_exception_type()
616 PyObject *PyCodec_StrictErrors(PyObject *exc) in PyCodec_StrictErrors() argument
618 if (PyExceptionInstance_Check(exc)) in PyCodec_StrictErrors()
619 PyErr_SetObject(PyExceptionInstance_Class(exc), exc); in PyCodec_StrictErrors()
627 PyObject *PyCodec_IgnoreErrors(PyObject *exc) in PyCodec_IgnoreErrors() argument
631 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) { in PyCodec_IgnoreErrors()
632 if (PyUnicodeEncodeError_GetEnd(exc, &end)) in PyCodec_IgnoreErrors()
635 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) { in PyCodec_IgnoreErrors()
636 if (PyUnicodeDecodeError_GetEnd(exc, &end)) in PyCodec_IgnoreErrors()
639 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) { in PyCodec_IgnoreErrors()
640 if (PyUnicodeTranslateError_GetEnd(exc, &end)) in PyCodec_IgnoreErrors()
644 wrong_exception_type(exc); in PyCodec_IgnoreErrors()
652 PyObject *PyCodec_ReplaceErrors(PyObject *exc) in PyCodec_ReplaceErrors() argument
659 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) { in PyCodec_ReplaceErrors()
662 if (PyUnicodeEncodeError_GetStart(exc, &start)) in PyCodec_ReplaceErrors()
664 if (PyUnicodeEncodeError_GetEnd(exc, &end)) in PyCodec_ReplaceErrors()
676 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) { in PyCodec_ReplaceErrors()
678 if (PyUnicodeDecodeError_GetEnd(exc, &end)) in PyCodec_ReplaceErrors()
682 else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) { in PyCodec_ReplaceErrors()
685 if (PyUnicodeTranslateError_GetStart(exc, &start)) in PyCodec_ReplaceErrors()
687 if (PyUnicodeTranslateError_GetEnd(exc, &end)) in PyCodec_ReplaceErrors()
700 wrong_exception_type(exc); in PyCodec_ReplaceErrors()
705 PyObject *PyCodec_XMLCharRefReplaceErrors(PyObject *exc) in PyCodec_XMLCharRefReplaceErrors() argument
707 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) { in PyCodec_XMLCharRefReplaceErrors()
718 if (PyUnicodeEncodeError_GetStart(exc, &start)) in PyCodec_XMLCharRefReplaceErrors()
720 if (PyUnicodeEncodeError_GetEnd(exc, &end)) in PyCodec_XMLCharRefReplaceErrors()
722 if (!(object = PyUnicodeEncodeError_GetObject(exc))) in PyCodec_XMLCharRefReplaceErrors()
820 wrong_exception_type(exc); in PyCodec_XMLCharRefReplaceErrors()
830 PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc) in PyCodec_BackslashReplaceErrors() argument
832 if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) { in PyCodec_BackslashReplaceErrors()
842 if (PyUnicodeEncodeError_GetStart(exc, &start)) in PyCodec_BackslashReplaceErrors()
844 if (PyUnicodeEncodeError_GetEnd(exc, &end)) in PyCodec_BackslashReplaceErrors()
846 if (!(object = PyUnicodeEncodeError_GetObject(exc))) in PyCodec_BackslashReplaceErrors()
901 wrong_exception_type(exc); in PyCodec_BackslashReplaceErrors()
907 static PyObject *strict_errors(PyObject *self, PyObject *exc) in strict_errors() argument
909 return PyCodec_StrictErrors(exc); in strict_errors()
914 static PyObject *ignore_errors(PyObject *self, PyObject *exc) in ignore_errors() argument
916 return PyCodec_IgnoreErrors(exc); in ignore_errors()
920 static PyObject *replace_errors(PyObject *self, PyObject *exc) in replace_errors() argument
922 return PyCodec_ReplaceErrors(exc); in replace_errors()
926 static PyObject *xmlcharrefreplace_errors(PyObject *self, PyObject *exc) in xmlcharrefreplace_errors() argument
928 return PyCodec_XMLCharRefReplaceErrors(exc); in xmlcharrefreplace_errors()
932 static PyObject *backslashreplace_errors(PyObject *self, PyObject *exc) in backslashreplace_errors() argument
934 return PyCodec_BackslashReplaceErrors(exc); in backslashreplace_errors()