STINNER Victor <[EMAIL PROTECTED]> added the comment:

Ooops, my first version introduces a regression: if file open fails, 
the traceback printing was stopped. Here is a new version of my patch 
to support #coding: header in _Py_DisplaySourceLine(). It doesn't 
print the line of file open fails, but continue to display the end of 
the traceback.

But print still stops on PyFile_WriteObject() or PyFile_WriteString(). 
If PyFile fails, I guess that next print will also fails. (it's also 
the current behaviour of PyTraceBack_Print).

Example:
----
Python 3.0rc1+ (py3k:66643M, Sep 27 2008, 17:11:51)
>>> raise Exception('err')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: err
----

The line is not displayed (why? no idea), but the exception 
("Exception: err") is still displayed.

Added file: http://bugs.python.org/file11633/traceback_unicode-2.patch

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3975>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to