next up previous 211
Next: Returning the status to the environment
Up: Using ERR within ADAM applications
Previous: Initial error context level


Reserved token STATUS

Historically, considerable use in ADAM was made of the VAX/VMS MESSAGE utility, both to generate globally unique error codes and to associate each error code with the text of an error message. The utility is also used by the VMS operating system for reporting its own messages. This has resulted in the idea of a reserved message token, STATUS, which would expand to the message associated with the given status value.

Every call to ERR_REP results in the status value given being converted into its associated VAX/VMS message, and then this message is associated with the token STATUS. Hence the global status may be used to construct an error message as follows:

      CALL ERR_REP( 'DSCALE_BAD','%DSCALE: ^STATUS', STATUS )

This method of constructing error messages makes the assumption that all status values and operating system error numbers form part of a homogeneous set which can easily be associated with some appropriate message text. It is therefore not portable from VAX/VMS to other computer systems. If the STATUS token is used on other systems, an attempt will be made to translate it as a Starlink facility status value.

Subroutines following the recommended error reporting strategy will always make an accompanying error report when the returned status is set to an error value. As a result, error reports based upon the reserved token STATUS are rarely necessary and limit the portability of ADAM software.

New code should not use the reserved token STATUS. If it is required to include the message associated with an error code in an error report, subroutine ERR_FACER should be used to create some other token.



next up previous 211
Next: Returning the status to the environment
Up: Using ERR within ADAM applications
Previous: Initial error context level

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