When you just want to do a try-except without handling the exception, how do you do it in Python?
Is the following the right way to do it?
try:
s
When you just want to do a try catch without handling the exception, how do you do it in Python?
This will help you to print what the exception is:( i.e. try catch without handling the exception and print the exception.)
import sys
try:
doSomething()
except:
print "Unexpected error:", sys.exc_info()[0]