SETMSG ( Set Long Error Message )
SUBROUTINE SETMSG ( MSG )
Set the value of the current long error message.
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
MSG I A long error message.
MSG A ``long'' error message.
MSG is a detailed description of the error.
MSG is supposed to start with the name of the
module which detected the error, followed by a
'RDTEXT: There are no more free logical units'
Only the first LMSGLN characters of MSG are stored;
any further characters are truncated.
Generally, MSG will be stored internally by the SPICELIB
error handling mechanism. The only exception
is the case in which the user has commanded the
toolkit to ``ignore'' the error indicated by MSG.
As a default, MSG will be output to the screen.
See the required reading file for a discussion of how
to customize toolkit error handling behavior, and
in particular, the disposition of MSG.
LMSGLN is the maximum length of the long error message. See
the include file errhnd.inc for the value of LMSGLN.
This routine does not detect any errors.
However, this routine is part of the interface to the
SPICELIB error handling mechanism. For this reason,
this routine does not participate in the trace scheme,
even though it has external references.
The SPICELIB routine SIGERR should always be called
AFTER this routine is called, when an error is detected.
The effects of this routine are:
1. If acceptance of a new long error message is
MSG will be stored internally. As a result,
The SPICELIB routine, GETMSG, will be able to
retrieve MSG, until MSG has been ``erased''
by a call to RESET, or overwritten by another
call to SETMSG.
2. If acceptance of a new long error message is not allowed,
a call to this routine has no effect.
In the following example, N is supposed to be less than
MAXLUN. If it isn't, an error condition exists.
C We will need a free logical unit. But only if we don't
C have too many files open already.
IF ( N .EQ. MAXLUN ) THEN
CALL SETMSG ( 'RDTEXT: Too many files open already' )
CALL SIGERR ( 'SPICE(TOOMANYFILESOPEN)' )
SIGERR must be called once after each call to this routine.
N.J. Bachman (JPL)
SPICELIB Version 1.0.2, 29-JUL-1997 (NJB)
Maximum length of the long error message is now represented
by the parameter LMSGLN. Miscellaneous header fixes were
made. Some indentation and vertical white space abnormalities
in the code were fixed. Some dubious comments were deleted
from the code.
SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
Comment section for permuted index source lines was added
following the header.
SPICELIB Version 1.0.0, 31-JAN-1990 (NJB)