Message202524
On 10.11.2013 14:03, Nick Coghlan wrote:
>
> Updated patch (v5) with a more robust chaining mechanism provided as a private "_PyErr_TrySetFromCause" API. This version eliminates the previous whitelist in favour of checking directly for the ability to replace the exception with another instance of the same type without losing information.
>
> This version also has more direct tests of the exception wrapping behaviour as a dedicated test class.
>
> If I don't hear any objections in the next couple of days, I plan to commit this version.
This doesn't look right:
diff -r 1ee45eb6aab9 Include/pyerrors.h
--- a/Include/pyerrors.h Sat Nov 09 23:15:52 2013 +0200
+++ b/Include/pyerrors.h Sun Nov 10 22:54:04 2013 +1000
...
+PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause(
+ const char *prefix_format, /* ASCII-encoded string */
+ ...
+ );
BTW: Why don't we make that API a public one ? It could be useful
in C extensions as well.
In the error messages, I'd use "codecs.encode()" and "codecs.decode()"
(ie. with parens) instead of "codecs.encode" and "codecs.decode". |
|
Date |
User |
Action |
Args |
2013-11-10 13:21:30 | lemburg | set | recipients:
+ lemburg, barry, ncoghlan, vstinner, ezio.melotti, flox |
2013-11-10 13:21:30 | lemburg | link | issue17828 messages |
2013-11-10 13:21:29 | lemburg | create | |
|