FError()

FERROR()

Reports the error status of low-level file functions

Syntax

      FERROR() --> <nErrorCode>

Returns

<nErrorCode> Value of the DOS error last encountered by a low-level file function.

FERROR() Return Values

       Error          Meaning
       -------------- ----------------------------------------------
       0              Successful
       2              File not found
       3              Path not found
       4              Too many files open
       5              Access denied
       6              Invalid handle
       8              Insufficient memory
       15             Invalid drive specified
       19             Attempted to write to a write-protected disk
       21             Drive not ready
       23             Data CRC error
       29             Write fault
       30             Read fault
       32             Sharing violation
       33             Lock Violation

Description

After every low-level file function, this function will return a value that provides additional information on the status of the last low-level file functions’s performance. If the FERROR() function returns a 0, no error was detected. Below is a table of possibles values returned by the FERROR() function.

Examples

      #include "fileio.ch"
      nHandle := FCreate( "temp.txt", FC_NORMAL )
      IF FError() != 0
         ? "Cannot create file, DOS error ", FError()
      ENDIF

Compliance

Clipper

Files

Library is rtl

Seealso

FCLOSE(), FERASE(), FOPEN(), FWRITE()

3 responses to “FError()

  1. Pingback: Harbour All Functions – F | Viva Clipper !

  2. Pingback: Harbour Files and Folders Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.