Sets the error handling for all subsequent function calls. Most functions return error codes after each call. In addition, other error handling features are built into the library. This function controls those features. If the Universal Library cannot find the configuration file CB.CFG, it always terminates the program, regardless of the cbErrHandling() setting.
C/C++
int cbErrHandling(int ErrReporting, int ErrHandling)
Visual Basic
Function cbErrHandling(ByVal ErrReporting&, ByVal ErrHandling&) As Long
ErrReporting
This argument controls when the library will print error messages on the screen. The default is DONTPRINT. Set it to one of the constants in the "ErrReporting argument values" section below.
ErrHandling
This argument specifies what class of error will cause the program to halt. The default is DONTSTOP. Set it to one of the constants in the "ErrHandling argument values" section below.
DONTPRINT | Errors will not generate a message to the screen. In that case your program must always check the returned error code after each library call to determine if an error occurred. |
PRINTWARNINGS | Only warning errors will generate a message to the screen. Your program will have to check for fatal errors. |
PRINTFATAL | Only fatal errors will generate a message to the screen. Your program must check for warning errors. |
PRINTALL | All errors will generate a message to the screen. |
DONTSTOP | The program will always continue executing when an error occurs. |
STOPFATAL | The program will halt if a "fatal" error occurs. |
STOPALL | Will stop whenever any error occurs. If you are running in an Integrated Development Environment (IDE), when errors occur the environment may be shut down along with the program. If your IDE behaves this way, (QuickBasic and VisualBasic do), then set ErrHandling to DONTSTOP. Refer to the "Error Codes" topic for a complete list of error codes and their associated messages. |