import traceback try: Your Code Here except: traceback.print_exc() finally: raw_input("Press any key to close this window")
except: traceback.print_exc() raw_input("ERRORS OCCURRED") finally: raw_input("Update Successful")
except: traceback.print_exc() raw_input("ERRORS OCCURRED")
A try/except block would do this.Maybe something along these lines.import traceback try: Your Code Here except: outfile = open("error.txt","w") outfile.write(traceback.format_exc()) outfile.close()
import traceback try: Your Code Here except: outfile = open("error.txt","w") outfile.write(traceback.format_exc()) outfile.close()
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.