+ 1
Yes. That simple problem has a simple solution. My understanding of exception handling is that you are going to catch any error & then be able to handle it, might be a few different types of error get handled simply, other errors get a different treatment, & some need the program to save your data & terminate with an error message.
6th Jan 2021, 11:05 PM
HungryTradie
HungryTradie - avatar
0
Python3: Exceptions are errors within a "try" statement. If you are monitoring for exceptions then your program can catch the error (and respond to it) instead of crashing your program. One use is to catch garbage inputs (eg: a string when you are expecting am integer) & then loop back to get the user to input a valid value.
6th Jan 2021, 10:55 PM
HungryTradie
HungryTradie - avatar