Error Procedures

ATEasy has internal procedures that you can write in your OnError events to allow you to retrieve information about the currently running program, task, or test. The procedures are:

 

Procedure Name and Syntax

Description

Procedure: GetErrorMsg ( )

Syntax:
[ sError = ] GetErrorMsg ( )

Returns the current run-time error message. Use this procedure only when a recoverable run-time error occurs and the OnError event procedure is called. Otherwise the procedure returns an empty string.

For additional syntax information and an example, see GetErrorMsg Procedure.

Procedure: GetErrorNum ( )

Syntax:
[ IError = ] GetErrorNum ( )

Returns the current run-time error number. Use this procedure only when a recoverable run-time error occurs and the OnError event procedure is called. Otherwise the procedure returns a value of -1.

For additional syntax information and an example, see GetErrorNum Procedure.

Procedure: GetErrorModule ( )

Syntax:
[ obModule = ] GetErrorModule ( )

Returns the current run-time error module. Use this procedure only when a recoverable run-time error occurs and the OnError event procedure is called. Otherwise the procedure returns nothing.

For additional syntax information and an example, see GetErrorModule Procedure.

Note: ATEasy generates messages for error conditions found when application code is compiled (compiler errors) and when the compiled code is run (run-time errors).