Programmer Guide/Command Reference/EMSG: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
  #emsg := EMSG <var>errorCode</var>
  #emsg := EMSG <var>errorCode</var>
or
 
  EMSG <var>tableItem</var>
  EMSG <var>tableItem</var>



Revision as of 20:09, 23 March 2011

#emsg := EMSG errorCode
EMSG tableItem

The EMSG command will return a string describing the meaning of the numerical error code errorCode returned by an S_TOOLS-STx command. If a table item (tableItem) is passed instead of an error code, all error descriptions are stored in the table (deleting the previous contents).

// store all error messages in a simple table
#tab := new table *
EMSG $#tab

or

// check if command fails and display error message on error
#spu := new spu * testspu pa pb pc
if '$rc' > 0 em $rc ; SPU creation failed: $(emsg $rc)

Navigation menu

Personal tools