I am new to Python and just finished the 15 min lecture on Error handling in Python using the “try” and “except” blocks. It appears that we need to have prior knowledge of the error syntax to handle exceptions. This means I probably have to run my code without error handling and then handle them based on the errors that I see as the “except” construct takes them as argument
I am from scripting background and we do an independent error handling based on “if” constructs and not depend on the syntax of the error itself for catching those
BTW, on a lighter note is this not a catch-22 situation ? For handling error I need to make an error first to know the syntax ?