arcgis python exception handling

# Coding UTF8 = 
Import ArcPy
 Import OS
 Import SYS
 Import ylpy
 try : 
    A =. 1 
    B = 0 
    C = A / B
 the except Exception AS E: 
    arcpy.AddMessage (E) 

the finally :
         # '' 'regardless of whether the code error try statement will finally perform branch code '' ' 
        # ' '' to complete some finishing 'operations is connected' ' 
    arcpy.AddMessage ( ' finally been executed ' )

 

Guess you like

Origin www.cnblogs.com/gisoracle/p/11611083.html