Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

map(arcpy.AddError, traceback.format_exc().split(“n”))

$
0
0

What does this expression mean? I see this in many python scripts.

try:
    ...
except Exception as e:
    import traceback
    map(arcpy.AddError, traceback.format_exc().split("n"))
    arcpy.AddError(str(e))

traceback.format_exc().split(“n”) returns ['None','']


Viewing all articles
Browse latest Browse all 767

Trending Articles