
Hi all - So to summarize this thread: we want to make __str__ of a CLR exception return self.Message, right? That would seem to match the behavior of the std Python exceptions. Brian Lloyd brian@zope.com V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com
-----Original Message----- From: Bob Ippolito [mailto:bob@redivi.com] Sent: Saturday, May 28, 2005 11:57 PM To: Brian Lloyd Cc: Roman Yakovenko; pythondotnet@python.org Subject: Re: [Python.NET] Small improvment for CLR exceptions
On May 27, 2005, at 10:42 AM, Brian Lloyd wrote:
Sorry this was posted in wring thread.
On 5/25/05, Roman Yakovenko <roman.yakovenko@gmail.com> wrote:
Hi. Bryan could you add __str__ function to all CLR exceptions ? It will improve usability of this exception with python
unittest package.
Thanks
I guess I'm unclear on the goal. Looking at the built-in Python exceptions, they have a __repr__, but __str__ returns an empty string:
Only in the trivial case..
str(IndexError("reason here")) 'reason here'
-bob