Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/sigerr_c.html
Дата изменения: Sat Dec 17 06:09:42 2005 Дата индексирования: Mon Apr 11 00:09:00 2016 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п |
Inform the CSPICE error processing mechanism that an error has occurred, and specify the type of error.
ERROR
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- msg I A short error message.
msg A ``short'' error message. msg indicates the type of error that has occurred. Only the first 25 characters of msg will be stored; additional characters will be truncated. Generally, msg will be stored internally by the CSPICE error handling mechanism. The only exception is the case in which the user has commanded the error handling mechanism to ``ignore'' the error indicated by msg. As a default, msg will be output to the standard output. See the required reading file for a discussion of how to customize CSPICE error handling behavior, and in particular, the disposition of msg.
None.
None.
First of all, please read the ``required reading'' file. The information below will make a lot more sense if you do. This is the routine used by CSPICE to signal the detection of errors. Making a call to sigerr_c is the way to inform the error handling mechanism that an error has occurred. Specifically, the effects of this routine are: 1. If responding to the error indicated by msg has not been disabled: a. msg will be stored internally. As a result, The CSPICE routine, getmsg, will be able to retrieve msg, until msg has been ``erased'' by a call to reset_c, or overwritten by another call to sigerr_c. b. An indication of an ``error condition'' will be set internally. The CSPICE logical function, failed_c, will take the value, SPICETRUE, as a result, until the error condition is negated by a call to reset_c. c. All of the error messages that have been selected for automatic output via errprt_c will be output. The set of messages is some subset of { short message, long message, explanation of short message, traceback, and default message }. d. If the error response mode is not "RETURN", Setting of the long error message is enabled. You can't re-set the long error message, once it has been set, without first signalling an error. e. In "RETURN" mode, further signalling of error messages, and setting of the long message, are disabled. (These capabilities can be re-enabled by calling RESET). 2. If the error handling mechanism has been commanded to ``ignore'' the error indicated by msg, the call to sigerr_c has no effect. If you wish to set the long error message, call setmsg_c BEFORE calling sigerr_c.
In the following example, an error is signaled because the double precision variable x contains an invalid value. The value of x and the maximum allowed value MAXVAL are substituted into the error message at the locations indicated by the # signs below. /. Indicate that x is out of range if x is too large. ./ if ( x > MAXVAL ) { setmsg_c ( "Variable x = #; maximum allowed value is #" ); errdp_c ( "#", x ); errdp_c ( "#", MAXVAL ); sigerr_c ( "SPICE(VALUEOUTOFRANGE)" ) ; return; }
None.
This routine does not detect any errors. However, this routine is part of the interface to the CSPICE error handling mechanism. For this reason, this routine does not participate in the trace scheme, even though it has external references.
None.
N.J. Bachman (JPL) K.R. Gehringer (JPL)
None.
-CSPICE Version 1.1.0, 23-JUL-2001 (NJB) Removed tab characters from source file. -CSPICE Version 1.2.1, 25-MAR-1998 (EDW) Minor corrections to header. -CSPICE Version 1.2.0, 08-FEB-1998 (NJB) Re-implemented routine without dynamically allocated, temporary strings. Made various header fixes. -CSPICE Version 1.0.0, 25-OCT-1997 (EDW)
signal error condition