GetErrorMsg Procedure

Returns the current run-time error message.

Syntax

[ sError = ] GetErrorMsg ( )

The GetErrorMsg procedure syntax has the following parts:

 

Name

Type

Description

sError

BString

Error message

Comments

This function can be used only when a non-fatal and recoverable run-time error occurred and the OnError procedure was called or inside a catch clause within a Try statement. Otherwise, the function returns an empty string.

Example

The following example displays an error message in a message box.

OnError()

{

MsgBox(GetErrorMsg())

......

}

See Also

Abort, GetErrorNum, Ignore, Pause, Retry, Try