[issue6284] C/API PyErr_AsUnicode()

2013-07-05 Thread Christian Heimes
Changes by Christian Heimes : -- components: +Interpreter Core -None versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Pytho

[issue6284] C/API PyErr_AsUnicode()

2011-01-07 Thread Andreas Stührk
Andreas Stührk added the comment: There should also be a call to `PyErr_NormalizeException()`, as `PyErr_Fetch()` can return unnormalized exceptions (see e.g. issue #10756). -- nosy: +Trundle ___ Python tracker __

[issue6284] C/API PyErr_AsUnicode()

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: /* Returns the exception string as a new PyUnicode object or NULL if the conversion failed */ NULL is not very useful to analyze the error :-/ Why don't keep errors if the conversion failed? The caller will be responsible to use the new error, or to clear

[issue6284] C/API PyErr_AsUnicode()

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: + PyErr_Fetch(&error_type, &error_value, &error_traceback); + + PyErr_Clear(); I think that the call to PyErr_Clear() is useless, PyErr_Fetch() already cleared the exception. + /* clear the error */ + PyErr_Restore(error_type, e

[issue6284] C/API PyErr_AsUnicode()

2011-01-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo stage: -> patch review type: -> feature request versions: +Python 3.3 -Python 3.1 ___ Python tracker ___

[issue6284] C/API PyErr_AsUnicode()

2009-06-16 Thread Campbell Barton
Campbell Barton added the comment: Updated with an PyErr_DisplayEx function that accepts a file argument. -- Added file: http://bugs.python.org/file14308/PyErr_AsUnicode_r73443.diff ___ Python tracker _

[issue6284] C/API PyErr_AsUnicode()

2009-06-16 Thread Campbell Barton
Campbell Barton added the comment: Thanks for the feedback, I wasnt aware of PyErr_Display, its not documented as far as I know. http://docs.python.org/dev/py3k/genindex-all.html For blender, its development id still in progress so we don't yet have an internal console replacement. however we

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: PyErr_Print seems a too high-level function for this usage: - it uses sys.excepthook - it exits the process if the exception is SystemExit (!) I'd prefer a function similar to PyErr_Display. And sys.stderr should not be redirected to a temporary stream:

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Changes by Campbell Barton : Added file: http://bugs.python.org/file14301/PyErr_AsUnicode_r73429.diff ___ Python tracker ___ ___ Python-bugs-li

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Changes by Campbell Barton : Removed file: http://bugs.python.org/file14300/PyErr_AsUnicode_r73429.diff ___ Python tracker ___ ___ Python-bugs-

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Changes by Campbell Barton : Removed file: http://bugs.python.org/file14299/PyErr_AsUnicode_r73429.diff ___ Python tracker ___ ___ Python-bugs-

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Campbell Barton added the comment: last patch was bad heres a new one. -- Added file: http://bugs.python.org/file14300/PyErr_AsUnicode_r73429.diff ___ Python tracker ___

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
New submission from Campbell Barton : This function returns the output of PyErr_Print as a unicode string. We needed this in Blender3D because it has its own error logging system which does not use the console. The patch is made against python3k r73429. -- components: None files: PyErr