Use the try/except method to just move beyond those errors my friend. Very simple.
import arcpyfrom arcpy import envimport sysvalue = arcpy.GetParameterAsText(0)try: arcpy.AddMessage(value) arcpy.AddMessage("VERY INTERESTING VALUE....") arcpy.AddMessage("FORCED EXIT") sys.exit(0)except SystemExit: arcpy.AddMessage("WHEN I EXIT I GO HERE: SystemExit exception") passexcept: arcpy.AddError("ERROR ERROR" ) arcpy.AddError(arcpy.GetMessages(2)) Enjoy!
*You can also use:
import os
os_exit(0)
I haven't tested this though.