GIS5103 - Debugging and Error Handling
During module 2 of GIS Programming we learned about fixing errors. In particular we were taught of various ways of identifying errors and how to handle them. The first method of identifying errors included simply running the script to see the error presented if the script failed to run. The error presented states the type of error and tells the user which line of the script it can be found on. The second method, referred to a debugging, runs the script line by line allowing the user to pinpoint the issue(s). We also learned how to implement a try-except statement. A try-except statement in placed strategically in the script to handle the error, allowing the script to successfully run with the error present. An exception is made for the error. This week we were tasked with fixing the errors in three scripts. The first script had a few syntax errors or spelling errors. Below is an image of the successful result and an accompanying flow chart. The second scrip...