Index Page
sigerr
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

      SIGERR ( Signal Error Condition )
 
      SUBROUTINE SIGERR ( MSG )
 

Abstract

     Inform the SPICELIB error processing mechanism that an error has
     occurred, and specify the type of error.

Required_Reading

     ERROR

Keywords

     ERROR

Declarations

 
      CHARACTER*(*)                 MSG
 

Brief_I/O

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

Detailed_Input

      MSG     A ``short'' error message.
              MSG indicates the type of error that has occurred.

              The exact format that MSG must follow is
              described in the required reading file, error.req.
              Only the first 25 characters of MSG will be stored;
              additional characters will be 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 error
              handling mechanism 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 SPICELIB error handling behavior, and
              in particular, the disposition of MSG.

Detailed_Output

      None.

Parameters

     None.

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

      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 SPICELIB to signal the detection
      of errors.

      Making a call to SIGERR 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 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 SIGERR.

          b. An indication of an ``error condition'' will
             be set internally.  The SPICELIB logical
             function, FAILED, will take the value, .TRUE.,
             as a result, until the error condition is
             negated by a call to RESET.

          c. All of the error messages that have been selected
             for automatic output via ERRPRT 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
          has no effect.

      If you wish to set the long error message, call
      SETMSG BEFORE calling SIGERR.

Examples

  1.  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 SIGERR ( 'SPICE(TOOMANYFILESOPEN)' )
                RETURN

             END IF


  2.  This time, we want to set the long error message, too.



             IF ( N .EQ. MAXLUN ) THEN

                CALL SETMSG ( 'RDTEXT:  Can't open another file; ' //
            .                 'max number of files open at once '  //
            .                 'for reading by RDTEXT is 20'  )

                CALL SIGERR ( 'SPICE(TOOMANYFILESOPEN)' )
                RETURN

             END IF

Restrictions

      None.

Literature_References

      None.

Author_and_Institution

      N.J. Bachman    (JPL)
      K.R. Gehringer  (JPL)

Version

    SPICELIB Version 2.1.1, 18-APR-2014 (BVS)

        Minor header edits.

    SPICELIB Version 2.1.0, 26-JUL-1996 (KRG)

        The STOP statement in this subroutine has been replaced
        with a call to the subroutine BYEBYE which passes a failure
        status to the operating system or command shell/environment
        on all platforms which support this capability.

    SPICELIB Version 2.0.0, 22-APR-1996 (KRG)

        This subroutine has been modified in an attempt to improve 
        the general performance of the SPICELIB error handling 
        mechanism. The specific modification has been to change the 
        type of the error action from a short character string to an 
        integer. This change is backwardly incompatible because the 
        type has changed.

    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:18 2017