• Victor Stinner's avatar
    Issue #18664, #18408: Rewrite PyErr_WriteUnraisable() to handle errors · f1786eaf
    Victor Stinner authored
     * Catch PyFile_WriteString() and PyFile_WriteObject() errors
     * Clear the current exception on _PyObject_GetAttrId() failure
     * Use PyUnicode_CompareWithASCIIString() and PyFile_WriteObject() instead of
       _PyUnicode_AsString() and strcmp() to avoid Unicode encoding error. stderr
       has a more tolerant error handler than utf-8/strict.
    f1786eaf
errors.c 28 KB