O'Reilly logo

Programming ArcGIS 10.1 with Python Cookbook by Eric Pimpler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing for and responding to specific error messages

All errors and warnings generate a specific error code. It is possible to check for specific error codes in your scripts and perform some type of action based on these errors. This can make your scripts even more versatile.

Getting ready…

All errors and warnings generated by a geoprocessing tool contain both a six digit code and a description.Your script can test for specific error codes and respond accordingly.You can get a listing of all the available error messages and codes in the ArcGIS Desktop help system by going to Geoprocessing | Tool errors and warnings.This is illustrated in the following screenshot.All errors will have a unique page that briefly describes the error by code number: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required