Message767

Author pedronis
Recipients
Date 2002-10-18.20:07:56
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
 
History
Date User Action Args
2008-02-20 17:17:10adminlinkissue625391 messages
2008-02-20 17:17:10admincreate