CT_ERRORACT

 ERRORACT()
 Recommends an action for a DOS error that has occurred previously
------------------------------------------------------------------------------
 Syntax

     ERRORACT() --> nActionCode

     Warning!  This function requires DOS 3.1 or higher.

 Returns

     ERRORACT() returns a numeric code that provides more information on how
     to react to the last DOS error.  Coding is as follows:

     Table 12-2: DOS Error Action Codes
     ------------------------------------------------------------------------
     Code    Definition
     ------------------------------------------------------------------------
     1       Try several times, then ask user
     2       Try several times with pauses, then ask user
     3       Ask user for data
     4       Leave program normally
     5       Leave program as soon as possible
     6       Ignore
     7       User should correct error and try again
     ------------------------------------------------------------------------

 Description

     DOS reacts to errors in several ways.  One of the best known and least
     preferred by programmers is the question:  "(A)bort, (R)etry, (I)gnore".
     ERRORACT() tells you how the application should react to the last DOS
     error that occurred.

 Example

     Show an error that requires the program to terminate:

     nAction  :=  ERRORACT()
     IF nAction = 4
        ? "Unfortunately, the program must be terminated!"
        QUIT
     ENDIF

See Also: ERRORBASE() ERRORCODE() ERRORORG()

 

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.