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()
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.