From: SourceForge.net <no...@so...> - 2005-06-13 01:56:58
|
Bugs item #1149372, was opened at 2005-02-22 14:52 Message generated for change (Settings changed) made by bzimmer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1149372&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Lilach Bien (lilachb) Assigned to: Brian Zimmer (bzimmer) Summary: exceptions problem in __str__ Initial Comment: When defining a class that overloads the __str__ method and raises an exception in the overloaded method, for example class C: def __str__(self): raise Exception("i am an exception") If we call str on an object of this class the exception will not be raised x=C() str(x) (no exception will be reported by jython) P.S. when using x.__str__() the exception will be raised and jython will display it ---------------------------------------------------------------------- Comment By: Brian Zimmer (bzimmer) Date: 2005-02-22 22:43 Message: Logged In: YES user_id=37674 The behaviour of raising an exception is consistent with CPython. The bug is in PyInstance which catches the thrown exception and then calls __repr__. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1149372&group_id=12867 |