next up previous 211
Next: When to report an error
Up: ERR - Error Reporting System
Previous: Reporting errors


Message tokens in error messages

Message tokens can be used in the error text presented to ERR_REP in the same manner as their use in calls to MSG_OUT, MSG_OUTIF and MSG_LOAD. Here is an example where two values, LOWER and UPPER, are in conflict:

*  Check if LOWER and UPPER are in conflict.
      IF ( LOWER .GT. UPPER ) THEN

*     Construct and report the error message.
         STATUS = SAI__ERROR
         CALL MSG_SETI( 'LO', LOWER )
         CALL MSG_SETI( 'UP', UPPER )
         CALL ERR_REP( 'BOUND_ERR', 
     :                'LOWER(^LO) is greater than UPPER(^UP).', STATUS )
         GO TO 999
      END IF

If the value of LOWER is 50 and the value of UPPER is 10, then the user might receive a message like:

!! LOWER(50) is greater than UPPER(10).

After a call to ERR_REP, all message tokens are left undefined.



next up previous 211
Next: When to report an error
Up: ERR - Error Reporting System
Previous: Reporting errors

MERS (MSG and ERR) Message and Error Reporting Systems
Starlink User Note 104
P C T Rees
A J Chipperfield
22 October 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2001 Council for the Central Laboratory of the Research Councils