APGen Documentation Previous Topic: APGError.Description Next Topic: APGError.FilePath Parent Topic: APGError Object    APGError Object
APGError.Severity
See Also:

The APGError.Severity property returns the severity of the error.

Syntax

VBScript:

severity = oAPGError.Severity

JScript:

severity = oAPGError.Severity;

Object

oAPGError An APGError object.

Return Value

severity An ApgLogSeverityEnum value.

Notes

See the ApgLogSeverityEnum Enum topic for a list of possible values.

Fatal errors halt script execution.  Errors with non-fatal severity allow script execution to continue.  This script fragment tests for a fatal error:

' Retrieve an error object for an APGScript that has been Run.
Dim oError
oError = oAPGScript.GetLastError()

If (oError.Number <> 0) And (oError.Severity = apgSeverityFatal) Then
     ' Fatal error occurred
     . . .
End If

Applies To

APGError Object