Python Forum
[Tkinter] function to handle exception errors
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] function to handle exception errors
#2
you should only capture expected exceptions, If you're not sure what is getting thrown,
you can temporarily:
import sys
# add after line 15
        print("Unexpected error:", sys.exc_info()[0])
        raise
But once you're confident of the exceptions that you are getting, you should
change the except clause to be: 'except ValueError:' for example
Reply


Messages In This Thread
function to handle exception errors - by atlass218 - Aug-15-2018, 10:20 PM
RE: function to handle exception errors - by Larz60+ - Aug-16-2018, 01:05 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020