Skip to main content

GetSeverityLevel

Zusammenfassung

Returns the severity level. The severity level is used to control how geoprocessing tools raise exceptions.

Syntax

GetSeverityLevel()

Rückgabewert

Datentyp Erläuterung

Integer

The severity level.

  • 0—A tool will not raise an exception, even if the tool produces an error or warning.

  • 1—If a tool produces a warning or an error, the tool will raise an exception.

  • 2—If a tool produces an error, the tool will raise an exception. This is the default.

Codebeispiel

GetSeverityLevel example

Use the GetSeverityLevel function to get the severity level.

import arcpy
severity_level = arcpy.GetSeverityLevel()
print(severity_level)