Command IT_ErrorText

4D Internet Commands

IT_ErrorText

version 6.5


IT_ErrorText (error) String

ParameterTypeDescription
errorIntegerError code returned from other commands

Function result String Text of the error

Description

The IT_ErrorText command takes an integer error number as its only parameter and returns the String/Text description of that error. Note that this is one of the few 4D Internet Commands that does not return an Integer as its functional value.

error is the integer number of the error.

Example

The following is an example of an ErrorCheck routine that will display an alert message explaining the cause of an error.

   `Method: ERRCHECK ("Command Name"; Error# ) -> True/False
   C_TEXT(vErrorMsg)
   $Command:=$1
   $Error:=$2
   $Result:=True
   If ($Error#0)
      $Result:=False
      vErrorMsg:=IT_ErrorText ($Error)
      ALERT("ERROR -- "+Char(13)+"Command: "+$Command+Char(13)+"Error Code:"+String($Error)
                                       +Char(13)+"Description: "+vErrorMsg)
   End if 
   $0:=$Result

See Also

Appendix A, Programming Tips.