| NORSYS SOFTWARE © 2010 | NETICA API | C VERSION 4.18

void ClearError_ns ( | report_ns* error )

Removes the error report error from the system.

The memory used by error is freed, so you must not use error after calling this. In fact, even any string previously returned by ErrorMessage_ns for this error will now be invalid because it is deleted as well.

Does nothing if error is NULL.

The name of this function is very similar to ClearErrors_ns, but hopefully there won't be any confusion since their arguments are so different.

Remember that just because you clear away the error record doesn't mean that the problem that caused it has necessarily gone away!

Version:

This function is available in all versions.

See also:

ClearErrors_ns |  | Clears all the errors
GetError_ns |  | Retrieves the error to be cleared

Example:

    The following function is available in NeticaEx.c:
    // Does the same function as ClearErrors_ns, but is less efficient.
    //
    void ClearErrors (environ_ns* env, errseverity_ns severity){
        report_ns* error = NULL;
        while (1){
            error = GetError_ns (env, NOTHING_ERR, error);
            if (error == NULL)  break;
            if (ErrorSeverity_ns (error) <= severity)
                ClearError_ns (error);
        }
    }

Example 2:

    See GetError_ns