I have a function called by the main program:
try: someFunction() except: print \"exception happened!\"
but in the middle of the ex
You can start as Lauritz recommended, with:
except Exception as ex:
and then just to print ex like so:
print ex
try: #your try code here except Exception as ex: print ex