Ensenso::NxLibException

class Ensenso.NxLibException : public Exception

This class encapsulates NxLib API errors. All overloaded functions of NxLibItem and NxLibCommand not taking a return code pointer will throw an NxLibException when the API return code indicates an error.

Public Functions

NxLibException (string itemPath, int errorCode, NxLibItemToken token = null)

Creates a new NxLibException.

Param itemPath

The path to the tree node, which caused the exception.

Param errorCode

The error code that occurred while accessing the node.

Param token

An optional NxLibItemToken to keep the execution slot of an NxLibCommand alive while this exception instance exists.

int GetErrorCode ()

Returns the error code that caused this exception.

Return

The error code.

string GetErrorText ()

Returns the text description of the failure as returned by NxLib.NxLibTranslateReturnCode.

Return

The text description of the failure.

string GetItemPath ()

Returns the path to the tree node on which the failed operation was attempted.

Return

The path.

NxLibItemToken GetToken ()

Returns token that holds an NxLibItem.

Return

The token.

Private Members

string ItemPath
int ErrorCode
string ErrorText
NxLibItemToken Token