OP Get error text

4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next

version 1.5


OP Get error text (errorCode) String

ParameterTypeDescription
errorCodeLongintError code
Function resultStringError text for the given error code

Description

OP Get error text returns the description of errorCode.

Examples

This example calls the WhichError method if an error occurs:

   $ErrCode:=OP All records (ConnectID;vFile)
   If ($ErrCode=0)
      `Continue working
   Else
      WhichError ($ErrCode;"OP All records")
      `If an error has occurred
   End if 

The WhichError method accepts two parameters, the error code, and the routine name. The error code is passed to OP Get error text to retrieve the error text. The routine name is used to produce an error message that indicates the 4D Open call that provoked the error.

   C_LONGINT ($1)
   ALERT(OP Get error text ($1)+Char(Carriage return)+"Error with "+$2+".")

See Also

OP Set option.


4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next