This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients amaury.forgeotdarc, ideasman42, vstinner
Date 2011-01-07.22:45:04
SpamBayes Score 9.370866e-05
Marked as misclassified No
Message-id <1294440312.54.0.327391350734.issue6284@psf.upfronthosting.co.za>
In-reply-to
Content
/* 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 it.

If PyErr_AsUnicode() raises a new error on conversion error, you should raise an error on:

+	if (!PyErr_Occurred())
+		return NULL;

On keep PyImport_ImportModule(), PyObject_CallMethod() and PyObject_GetAttrString() error.

Oh, by the way, PyErr_AsUnicode returns NULL and raise an error if PyObject_CallObject() failed (if StringIO().getvalue() failed).
History
Date User Action Args
2011-01-07 22:45:12vstinnersetrecipients: + vstinner, amaury.forgeotdarc, ideasman42
2011-01-07 22:45:12vstinnersetmessageid: <1294440312.54.0.327391350734.issue6284@psf.upfronthosting.co.za>
2011-01-07 22:45:04vstinnerlinkissue6284 messages
2011-01-07 22:45:04vstinnercreate