Wednesday, July 17, 2013

GIS Programming, Lab 9: Debugging and Error Handling

This week we worked on debugging and handling errors that I (tirelessly) encounter.  This lab was super helpful and I almost wish it came earlier in the semester.  

We were provided with two script templates which were littered with (okay, maybe not littered but had several) errors.  These errors were both syntax errors and and exceptions.  The first one, we had to fix these issues to allow the script to write the names of all the airports in the airport shape file from week six. 

Screen shot of my list of airports.

In the second script, again, we had to locate and fix errors that we came across while checking, debugging and attempting to run.  Once everything was fixed, the script printed each data frame's name and the layers it contained within the Austin_TX.mxd we worked with last week.

Screenshot of the data frames listed and the layer names they contain.

Overall, a very helpful lab!

No comments:

Post a Comment