Error Processing
Error processing within ProvideX  
  Prior Next
 

During the execution of a program various error conditions may be detected by ProvideX. These errors may be due to problems with the program logic, improper data, or errors that indicate various status conditions (end-of-file, duplicate record, etc.). Typically, programs are designed to detect and process most errors that are anticipated in normal program operation. These common errors include invalid user input, end of file handling, and attempt to access a record which does not exist. Other errors such as division by zero and hardware failure on data files, while not normally expected, can also be handled by a program.

All errors have a numeric code associated with them. The value of this code indicates the type of error. This value may range from zero (0) to 127. When an error occurs, the system variable ERR is set to the value of the error code.

By default, whenever an error occurs, the error code (and its associated message text) and the statement on which the error occurred is displayed, the program stops, and ProvideX returns to COMMAND mode.

  Prior Next