Get the error code associated with the error.


Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)

Syntax

Visual Basic (Declaration)
Public Function getErrorCode() As Integer
C#
public int getErrorCode()
C++
public:
 int getErrorCode() sealed 
J#
public int getErrorCode()
JScript
public  function getErrorCode() : int

Remarks

If the error code is positive, then the error was returned by the server. If the value of the error code is -1, it is an error indicating misuse of the server interface itself.

IMPORTANT: Error codes for a given error will change from release to release. Because of this, a set of public static variables have been defined which coordinate the error to the proper error code.

The list of error codes returned by each method of the NetricsServerInterface have been provided in the documentation for the interface. For instance, "ARRAYLEN" is the first error listed as being returned by the tblload method. To test for this error in a way that stays consistent from version to version, please use code like this:

 Copy Code
                    if (NetricsException.getErrorCode() ==
                        (int)NetricsException.error_codes.ARRAYLEN) {
                         handle_the_ARRAYLEN_error();
                    }
                    

See Also