error man page on QNX

Man page or keyword search:  
man Server   4347 pages
apropos Keyword Search (all sections)
Output format
QNX logo
[printable version]

error(n)		     Tcl Built-In Commands		      error(n)

______________________________________________________________________________

NAME
       error - Generate an error

SYNOPSIS
       error message ?info? ?code?
_________________________________________________________________

DESCRIPTION
       Returns	a  TCL_ERROR  code,  which causes command interpretation to be
       unwound.	 Message is a string that is returned to  the  application  to
       indicate what went wrong.

       If  the	info argument is provided and is non-empty, it is used to ini‐
       tialize the global variable errorInfo.  errorInfo is used to accumulate
       a stack trace of what was in progress when an error occurred; as nested
       commands unwind, the Tcl interpreter adds information to errorInfo.  If
       the  info  argument  is present, it is used to initialize errorInfo and
       the first increment of unwind information will not be added by the  Tcl
       interpreter.   In other words, the command containing the error command
       will not appear in errorInfo; in its place will be info.	 This  feature
       is most useful in conjunction with the catch command: if a caught error
       cannot be handled successfully, info can be  used  to  return  a	 stack
       trace reflecting the original point of occurrence of the error:
	      catch {...} errMsg
	      set savedInfo $errorInfo
	      ...
	      error $errMsg $savedInfo

       If the code argument is present, then its value is stored in the error‐
       Code global variable.  This variable is intended	 to  hold  a  machine-
       readable	 description  of  the error in cases where such information is
       available; see the tclvars manual page for information  on  the	proper
       format  for  the	 variable.   If the code argument is not present, then
       errorCode is automatically reset to ``NONE'' by the Tcl interpreter  as
       part of processing the error generated by the command.

EXAMPLE
       Generate an error if a basic mathematical operation fails:
	      if {1+2 != 3} {
		  error "something is very wrong with addition"
	      }

SEE ALSO
       catch(n), return(n), tclvars(n)

KEYWORDS
       error, errorCode, errorInfo

Tcl								      error(n)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server QNX

List of man pages available for QNX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net