const char* ErrorMessage_ns ( const report_ns*  error )

Given a report of an error, this returns a message explaining the error.

The message will start with the name of the Netica API function which was executing when the error occurred (the one you called, not any that are called internally), followed by a colon, and then a descriptive part. Generally the descriptive part is not just a generic message corresponding to the error number, but rather names the elements involved, and describes what went wrong.

If you need the string to persist, make a copy of the string returned, since its contents may become invalid after further calls to Netica API (such as ClearError_ns or ClearErrors_ns). Do not try to directly modify or free the string returned.


This function is available in all versions.

See also:

ErrorNumber_ns    Returns the error's identification number
ErrorSeverity_ns    Returns how serious the error is
ErrorCategory_ns    Returns what kind of error it is
GetError_ns    Obtains the report_ns in the first place


See GetError_ns