Module 4- Debugging and Error Handling
In this module we explored numerous methods for debugging which included examining error messages, the addition of print statements, and practiced more selective commenting out of code. We also reviewed approaches to basic error-handling, coding errors in Python and ArcGIS geoprocessing.
The lab required to debug 3 different scripts:
The first required to fix the errors in the script. In the end, it would print the field names for a shape file.
The second script also had errors to fix and would produce a list of layers in an AcMap file.
The final script also had errors and consisted of 2 parts. Instead of fixing them I needed to include an exception for it to print the error in Part A and then continue to run the script in Part B.
Comments
Post a Comment