ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

ExecuteError

  • Summary
  • Code Sample

Summary

The ExecuteError exception class is raised whenever a geoprocessing tool encounters an error.

Code Sample

ExecuteError exception example

The ExecuteError class is used below to specifically handle any geoprocessing tool errors that result from CopyFeatures.

import arcpy

in_features = "c:/base/transport.gdb/roads"

try:
    # Note: CopyFeatures will always fail if the input and output are
    # the same feature class
    arcpy.CopyFeatures_management(in_features, in_features)

except arcpy.ExecuteError:
    print(arcpy.GetMessages())

Related Topics

  • Error handling with Python
  • ExecuteWarning
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal