IRAF help page for package language, program error

from NOAO error -- abort a taskUSAGEPARAMETERSDESCRIPTIONEXAMPLESBUGSSEE ALSO

error -- abort a task


USAGE

error errcode errmsg


PARAMETERS

errcode

An integer code identifying the error (not used at present in the CL since error handlers are not supported).

errmsg

A string describing the error.

DESCRIPTION

Error may be used to force an error exit from a script. The error message will be displayed, and control will return to the most recent interactive cl.


EXAMPLES

1. Abort the current task if there is an attempt to compute a negative square root.

	if (x < 0)
	    error (1, "sqrt of a negative number (x=" // x // ")")
	else
	    y = sqrt (x)

BUGS

BUGS There is currently no way to post an error handler to receive control if error is called.


SEE ALSO

cl, bye, logout,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu