On day 28 I did some more work with tkinter but also decided on starting early with error handling as that’s very important imho.
Day 28 of my #100DaysOfCode challenge I spent a bit more time on tkinter but also started with error handling.
— Wouter Kursten (@Magneet_nl) January 31, 2021
Notes:
error handling can have multiple excepts try: #tries to do something except specificError: #if some specific error happens except anotherError as error_message: # if another error happens print(f"Some error including {error_message} and more text") else: # if the try succeeds and only then print("whatever") finally: #runs no matter what happens raise exceptions raise TypeError or KeyError with ("a message")