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

Enters 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, errorCode is set to a list whose format is:

TOTALVIEW error-code subcodes... string

The contents of this lists are as follows:

  • The first list element is always TOTALVIEW.
     
  • The second is always the error code.
     
  • subcodes are not used at this time.
     
  • The last 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 tells the CLI to raise 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 TotalView-style 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.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0