[issue11627] segfault raising an arbitrary object as an exception

Antoine Pitrou report at bugs.python.org
Tue Mar 22 00:08:23 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

Le lundi 21 mars 2011 à 22:57 +0000, Andreas Stührk a écrit :
> Andreas Stührk <andy-python at hammerhartes.de> added the comment:
> 
> Attached is a patch. I'm not too happy about the error message though,
> I think it's more confusing than helpful.

You could try something more explicit, such as
"calling %s() should have returned an instance of BaseException, not %s"
% (type, Py_TYPE(value))

By the way, you have a tab character in your patch. Please only use
spaces for indentation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11627>
_______________________________________


More information about the Python-bugs-list mailing list