Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.13.5 GetErrorMessage (get an error message)

Purpose

Returns the error message associated with a specified error detail code.

Syntax
GetErrorMessage ([Code])
Argument
Code

Specify the error detail code as a number or as a variable that stores this value.

This value is optional. If you omit this value, the value currently stored in the _RTN_ reserved variable is assumed.

Description

The GetErrorMessage command returns the error message associated with a specified error detail code. The error message is truncated if it exceeds 1,024 bytes.

Example
If Exec (_WIN_+"NOTEPAD.EXE", True, _BIN_+"Logging.txt")_
Then
  Exit (_EXEC_RTN_)
Else
  Dim errMsg
  errMsg = GetErrorMessage (_RTN_)
  Message (Target_File, _BIN_+"ErrLog.txt", errMsg)
  Exit (1)
End
JP1/Script version

Supported from JP1/Script 01-01.