Next: ERR - Error Reporting System
Up: MSG - Message Reporting System
Previous: Renewing annulled message tokens
Resilience
Other than MSG_OUT, MSG_OUTIF, MSG_BLANK and MSG_LOAD, the Message System
subroutines do not use a STATUS argument.
This is because they are intended to be very robust.
In order to construct a message for output to the user, they will attempt to
recover from any internal failure.
The STATUS argument in the ``output'' routines conforms to the Starlink
convention for
inherited status.
This means that an application can contain sequences of MSG_SETx,
MSG_FMTx and MSG_OUT calls, and only needs to check the status at the
end.
There are two kinds of ``failure'' that can occur within the Message
System:
- Message Construction - Any tokens which cannot be evaluated while
constructing the output message are indicated in the message text by using a
special syntax.
This syntax is illustrated for the text resulting from the call:
CALL MSG_OUT( 'EXAMPLE_FLUX',
: 'Emission flux is ^FLUX (erg/cm2/s).', STATUS )
If the token ``FLUX'' is not defined, then this call will produce the text:
Emission flux is ^<FLUX> (erg/cm2/s).
There are several reasons why a token may be undefined:
- It has not been defined using MSG_SETx etc.
- It has been annulled by a previous call to MSG_OUT, MSG_OUTIF
or MSG_LOAD (or a corresponding ERR routine).
- An attempt has been made to define more than 64 message tokens.
- An error has been made in a call to one of the MSG_FMTx
subroutines.
This error could be either a syntax error in the FORMAT argument, or the
result of specifying a field width which is too small (referred to
as an ``output conversion error'' in Fortran).
Errors in message construction which result from undefined tokens are not
considered fatal and STATUS is not set as a result.
- Message Output - If an error occurs when
MSG_OUT, MSG_OUTIF or MSG_BLANK attempt to output the message, then the
STATUS argument will be set to an error value and an error message will be
reported.
Errors writing the message text to the standard output stream may occur for a
number of reasons - the seriousness of such an error is dependent upon where
the message was intended to go:
- Command terminal or VAX/VMS batch log file -
In this case the likelihood of being able to inform the user about the error
is small.
Generally, the application has little chance of continuing successfully under
these circumstances.
- Output file -
The message output may have been re-directed to an output file for the
duration of a particular application.
Under these circumstances, the user can probably be informed about the error
and the application may be able to continue.
Next: ERR - Error Reporting System
Up: MSG - Message Reporting System
Previous: Renewing annulled message tokens
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