I added a call to get the traceback object to your previous script (Batch merging field mapping). I added a shapefile with an "Acres" field that was one character wide, and got this traceback message:
ERROR 001156: Failed on input OID 0, could not write value '340.417' to output field Acres
My working version of your script, set up to run in Idle, is below.
import arcpy, sys, os, traceback
dataPath=r"C:\workspace\weld county\parcels"
try:
DataTypeL=[("Polygon","mergedTOTPoly.shp"),("Polyline","mergedTOTLines.shp"),("Point","MergedTOTPoint.shp")]
for dType in DataTypeL:
(Typei,Title)=dType
matches = []
counter=0
for dirpath, dirnames, filenames in arcpy.da.Walk(dataPath,datatype="FeatureClass",type=Typei):
for filename in filenames:
print filename
match = ( os.path.join(dirpath, filename))
#arcpy.AddMessage(m)
matches.append (match)
counter = counter + 1
arcpy.Merge_management(matches, dataPath+"\\utilities"+Title)
print counter
print Typei
#arcpy.AddMessage(counter+" "+Typei+" layers were merged into "+ filename)
except arcpy.ExecuteError:
# Get the tool error messages
#
msgs = arcpy.GetMessages(2)
# Return tool error messages for use with a script tool
#
arcpy.AddError(msgs)
# Print tool error messages for use in Python/PythonWin
#
print msgs
except:
# Get the traceback object
#
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
# Concatenate information together concerning the error into a message string
#
pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
# Return python error messages for use in script tool or Python Window
#
arcpy.AddError(pymsg)
arcpy.AddError(msgs)
# Print Python error messages for use in Python / Python Window
#
print pymsg + "\n"
print msgs