Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
DOS Error Message Function |
CA-Clipper | Opportunities | Tips and Tricks | Networking | Internal Errors | Source Code | CA-VO |
BACK TO CA-CLIPPER TIPS & TRICKS |
When CA-Clipper applications are unable to open a file, the reason
can be determined by checking the built-in ferror()
or doserror() functions. These functions return the
DOS error number as an integer numeric value. The ferror() function returns the error number from the last
low-level (binary) file operation. The low-level functions include
fclose() , fcreate() , ferase() ,
fopen() , fread() , freadstr() , and
frename() . If there is no error, ferror() returns
zero. The doserror() function returns the error number from various
other file operations, like opening a DBF file (with
use filename ) or an index
(set index to filename ). Specifically,
the doserror() value is set by CA-Clipper when it creates the
runtime error object which is later passed to the error handler. The
default error handler displays an alert box with the choices Quit,
Retry, and Default. If the failed operation has no associated
DOS error, then doserror() returns zero. Since both of these functions return only a number, the error can often be unclear. The DosErrMsg() function (see below) converts the
number into a more readable message. Notice that this so-called "DOS" error list includes errors that occur in the network shell, as well as memory and printer errors. The DOS error is also properly reported to CA-Clipper programs running under the various versions of Windows. |
|
Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
Send comments about this site to Greg at
gregh@ghservices.com All pages copyright © 1996-1999 GH Services Created 1997/09/20 Last updated 1999/09/30 All trademarks contained herein are the property of their respective owners |