Message767
https://sourceforge.net/mailarchive/message.php?
msg_id=2241629
import sys
import traceback
def divide(x,y):
return x/y
try:
print divide(8,0)
except:
traceback.print_exc()
sys.exit(1)
sys.exit(0)
When I execute this program in Python I get the
following output:
Traceback (most recent call last):
File "excepttest.py", line 8, in ?
print divide(8,0)
File "excepttest.py", line 5, in divide
return x/y
ZeroDivisionError: integer division or modulo by zero
The output contains a complete stack trace that I can
use for debugging
purposes. However, when I execute this program in
Jython I get the
following:
Traceback (most recent call last):
File "excepttest.py", line 5, in divide
return x/y
ZeroDivisionError: integer division or modulo
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:10 | admin | link | issue625391 messages |
2008-02-20 17:17:10 | admin | create | |
|