GetErrorString Method (PISDK Object)

                    

 

Returns a string with the error message associated with a passed error code from the PISDKErrorConstants enumeration.

The GetErrorString method finds errors defined in the string resources for PISDK.dll, PITimeServer.dll, PISDKRegistry.dll, and PISDKParse.dll. It also resolves PI Server status codes (-32000 to 0) and those that can be resolved by the Microsoft FormatMessage() function.

Syntax

object.GetErrorString pseError

The GetErrorString method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PISDK object.

pseError

A constant from the PISDKErrorConstants enumeration.

 

Remarks

At runtime when an error occurs, the string for a particular error is available in the extended error information. In Visual Basic this information can be obtained from the global error object, "Err". The extended error information contains a description property (Err.Description) that contains the text returned by this method but may also have additional context specific information appended. These strings are also available from the Object Browser in Visual Basic, as they are part of the type library.

Enabling Operational Intelligence