The hierarchical structure of an application within a software environment is illustrated in Figure 2.
It can be seen from Figure 2 that between an application and the operating system any environment is realised as a number of subroutine libraries, providing a set of documented facilities for the applications programmer to use. Between the user and an application, the environment will normally also provide a user interface which controls the loading of specific applications, the I/O to the user and the parameter system.
The exclusion of any user-callable message delivery mechanism from the Error Message Service allows EMS to be used for error reporting within software environment system routines without the danger of recursion on error. Conversely, the Error and Message Reporting Systems, ERR and MSG (see SUN/104), have bindings to specific software environments and thus the ability to deliver error and informational messages to the user via the user interface of that environment. The binding of ERR and MSG to a given software environment precludes their use for error reporting from within the environment system software because the error reporting would rely to some (probably unpredictable) extent upon the working state of that environment. Thus, ERR and MSG act as interfaces for a given environment with EMS, to be used only within applications software.
As an example, the ADAM versions of ERR and MSG are able to obtain the message text associated with a given message parameter from the ADAM interface file and are also able to include ADAM parameter keywords and references (i.e. file names, HDS object names or device names) in the message text. These features are useful when reporting error and informational messages from ADAM applications software. However, in order to provide these facilities, MSG and ERR make calls to the ADAM parameter system, data system and user interface and so depend upon the working state of these parts of the ADAM environment. These features preclude the use of MSG and ERR in the development of any subroutine library used by the parameter system, data system or user interface.