GetFailure


The GetFailure method returns failure code of last operation.
C++
long GetFailure(void);
BASIC
GetFailure() As FailureType

Parameters

Method has no parameters.

Return Values

The return value is the failure code of the last operation.
The return value is 0 if last operation succeeded.

Remarks

Failure code delivers general information on error and can be of one of the following values:
IXF_FAILURE_INTERNAL non-file object error (invalid parameter, not enough memory, etc.),
IXF_FAILURE_OPEN file open/create error,
IXF_FAILURE_CLOSE file close error,
IXF_FAILURE_FLUSH error on flushing data to file,
IXF_FAILURE_READ file read error,
IXF_FAILURE_WRITE file write error,
IXF_FAILURE_GETPOS get file position error,
IXF_FAILURE_SETPOS set file position error,
IXF_FAILURE_GETSIZE get file size error,
IXF_FAILURE_SETSIZE set file size error,
IXF_FAILURE_LOCK error on locking file,
IXF_FAILURE_UNLOCK error on unlocking file,
IXF_FAILURE_STAT get file status information error,
IXF_FAILURE_LICENSE object error on invalid or expired license.
Failure code in conjunction with error code retrieved with GetError method allows locating and analyzing errors more precisely. See Error Handling for more information on failure and error codes.

Most IXFile methods set error and failure codes on completion regardless of result; if operation failed codes are set to their appropriate values; if operation succeeded error and failure codes are both set to 0. For this reason you should retrieve failure code immediately when method returns to avoid wiping it out by another call.

See Also

GetError, GetErrorDescription, ClearError, Error Handling