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

Chapter 12. Error Handling and Troubleshooting

In this chapter, we will cover the following recipes:

  • Exploring the default Python error message
  • Adding Python exception handling structures (try/except/finally)
  • Retrieving tool messages with GetMessages()
  • Filtering tool messages by severity level
  • Returning individual messages with GetMessage()
  • Testing for and responding to specific error messages

Introduction

Various messages are returned during the execution of ArcGIS geoprocessing tools and functions. These messages can be informational in nature or indicate warning or error conditions that can result in the tool not creating the expected output or in outright failure of the tool to execute. These messages do not appear as message boxes. Instead, you will ...

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