1) python raise statement with argument.
try:
5 / 0
except Exception, e:
raise e
Output
=====
Traceback (most recent call last):
File "del me.py", line 5, in
raise e
ZeroDivisionError: integer division or modulo by zero
===================
2) python raise statement with no argument.
try:
5 / 0
except Exception, e:
raise e
Output
=====
Traceback (most recent call last):
File "del me.py", line 3, in
5 / 0
ZeroDivisionError: integer division or modulo by zero
No comments:
Post a Comment