New submission from Irit Katriel <[email protected]>:
They do things like
err = PyFile_WriteString("TypeError: print_exception(): Exception expected
for value, ", f);
err += PyFile_WriteString(Py_TYPE(value)->tp_name, f);
err += PyFile_WriteString(" found\n", f);
which means that PyFile_XXX functions are called after error. They should
return (abort printing the exception) instead.
It gets even more interesting with PyFile_WriteObject calls - this function
asserts that the exception is not set, so the code calls PyErr_Clear() before
calling PyFile_WriteObject(). It should avoid making the call altogether.
----------
assignee: iritkatriel
messages: 405126
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Tidy up error handling in traceback.c / python run.c
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45635>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com