Totalview® for HPC Reference Guide : PART I CLI Commands : Chapter 3 CLI Namespace Commands : errorCodes
errorCodes
Returns or raises TotalView error information
Format 
Returns a list of all error code tags
TV::errorCodes
Returns or raises error information
TV::errorCodes number_or_tag [ -raise [ message ] ]
Arguments 
number_or_tag
An error code mnemonic tag or its numeric value.
-raise
Raises the corresponding error. If you append a message, TotalView returns this string. Otherwise, TotalView uses the human-readable string for the error.
message
An optional string used when raising an error.
Description 
The TV::errorCodes command lets you manipulate the TotalView error code information placed in the Tcl errorCodes variable. The CLI sets this variable after every command error. Its value is intended to be easy to parse in a Tcl script.
When the CLI or TotalView returns an error, errorCodes is set to a list with the following format:
TOTALVIEW error-code subcodes... string
where:
The first list element is always TOTALVIEW.
The second list element is always the error code.
The subcodes argument is not used at this time.
The last list element is a string describing the error.
With a tag or number, this command returns a list containing the mnemonic tag, the numeric value of the tag, and the string associated with the error.
The -raise option raises an error. If you add a message, that message is used as the return value; otherwise, the CLI uses its textual explanation for the error code. This provides an easy way to return errors from a script.
Examples 
foreach e [TV::errorCodes] {
puts [eval format {"%20s %2d %s"} \
[TV::errorCodes $e]]}
Displays a list of all TotalView error codes.
Related Topics
dprint Command
TV::expr Command