More About Error Handling

ATEasy run-time errors can be generated using the error statement or as a result of a run-time error such as divide by zero, communication failure and more. By default, ATEasy will display a message box displaying the error number, text and location of where the error occurred in your code. The message will contain the following buttons:

        Abort – Pressing abort will call the OnAbort() event sequence and could abort the program. 

        Ignore – continue execution with the statement following the statement that caused the error. 

        Retry – will display only retry able errors such as communication error. Retry will cause the statement causing the error to be called again. 

        Pause – this button is available only when running from the development environment. Pressing pause will cause the execution to be paused and will cause ATEasy to display the statement causing the error. The user then can watch variables, changes the current statement and debug.

ATEasy applications can trap and handle errors before the default message box is displayed. You can place code in the OnError() module event to handle error and can handle errors programmatically using the abort, retry, ignore and pause statements. In addition the try-catch statement can handle errors locally and provide local error and exception handling. In addition the GetErrorModule(), GetErrorNum() and GetErrorMsg() internal functions can be called to retrieve error information.

The driver procedure and the CheckError procedure causes the user to concentrate on the test code without the need to check for errors after each statement. It also provides the test program or the application with a single point (the OnError() module event) area in which to place the error handling code.