Hi all,
ipy 2.0 traceback seems to lose track of where exceptions come from
inside try-except blocks (which hampers debugging):
bash-3.2$ cat foo.py
import bar
class E(Exception):
def __init__(self, message):
Exception.__init__(self, message)
try:
bar.baz()
except E, ex:
pass
bash-3.2$ cat bar.py
def baz():
"".sort(key=key_comparer.key)
bash-3.2$ ipy foo.py
Traceback (most recent call last):
File "foo.py", line 6, in foo.py
AttributeError: 'str' object has no attribute 'sort'bash-3.2$
if I take the try-except block out I get the correct module line number:
bash-3.2$ cat foo2.py
import bar
class E(Exception):
def __init__(self, message):
Exception.__init__(self, message)
bar.baz()
bash-3.2$ ipy foo2.py
Traceback (most recent call last):
File "foo2.py", line 5, in foo2.py
File "h:\jobs\chris21views\bar.py", line 2, in baz
AttributeError: 'str' object has no attribute 'sort'bash-3.2$
Before I raise a bug I thought I would just check that I am not missing
something here.
Thanks, Kyle
************************************************************************
Allens Arthur Robinson online: http://www.aar.com.au
This email is confidential and may be subject to legal or other professional
privilege. It is also subject to copyright. If you have received it in error,
confidentiality and privilege are not waived and you must not disclose or use
the information in it. Please notify the sender by return email and delete it
from your system. Any personal information in this email must be handled in
accordance with the Privacy Act 1988 (Cth).
*************************************************************************
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com