Jan-17-2018, 07:30 AM
(This post was last modified: Jan-17-2018, 07:49 AM by Gribouillis.)
You can invoke the functions from the traceback module to obtain this, for example
import traceback as tb while True: n = input('Give me an integer: ') try: n = int(n) except ValueError: tb.print_exc() else: print('Got:', n)