Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFErrors(TKey).AddError Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFErrors(TKey).AddError Method
Add an error that is not specific to a PISystem or PIServer.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public void AddError(
	TKey key,
	Exception ex
)
Public Sub AddError ( 
	key As TKey,
	ex As Exception
)

Dim instance As AFErrors
Dim key As TKey
Dim ex As Exception

instance.AddError(key, ex)
public:
void AddError(
	TKey key, 
	Exception^ ex
)
member AddError : 
        key : 'TKey * 
        ex : Exception -> unit 

Parameters

key
Type: TKey
The dictionary key for the error added to the Errors dictionary.
ex
Type: SystemException
The error exception to be added.

Exceptions

ExceptionCondition
ArgumentNullException Thrown when the requested key is .

Remarks

This method will add the error to the Errors dictionary and set the HasErrors to .

Version Information

AFSDK


See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in