Index Page
setmsg
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     SETMSG  ( Set Long Error Message )
 
      SUBROUTINE SETMSG ( MSG )
 

Abstract

     Set the value of the current long error message.

Required_Reading

     ERROR

Keywords

     ERROR

Declarations

 
      CHARACTER*(*)                 MSG
 

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     MSG        I   A long error message.

Detailed_Input

     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
             colon.  Example:

                '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.

Detailed_Output

     None.

Parameters

     LMSGLN  is the maximum length of the long error message.  See
             the include file errhnd.inc for the value of LMSGLN.

Exceptions

     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.

Files

     None.

Particulars

     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
            allowed:

            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.

Examples

      In the following example, N is supposed to be less than
      MAXLUN.  If it isn't, an error condition exists.

      C
      C      We will need a free logical unit.  But only if we don't
      C      have too many files open already.
      C

             IF ( N .EQ. MAXLUN ) THEN

                CALL SETMSG ( 'RDTEXT: Too many files open already' )
                CALL SIGERR ( 'SPICE(TOOMANYFILESOPEN)' )

                RETURN

             END IF

Restrictions

     SIGERR must be called once after each call to this routine.

Literature_References

     None.

Author_and_Institution

     N.J. Bachman    (JPL)

Version

    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)
Wed Apr  5 17:47:16 2017