Opened 16 years ago
Closed 15 years ago
#149 closed enhancement (fixed)
Review messages/ROPP errors
Reported by: | Huw Lewis | Owned by: | Huw Lewis |
---|---|---|---|
Priority: | normal | Milestone: | 4.0 |
Component: | ROPP (all) | Version: | 2.0beta |
Keywords: | Cc: |
Description (last modified by )
Several routines within ROPP use the 'messages' library for outputting error messages and terminating programs (if necessary). This needs to be reviewed with a mind to applying ROPP within existing operational code. Propose replacing 'message' status with error libraries, which a user then has control to use the information themselves to stop programs etc [use OPS error handling as template].
Messages is a useful tool for use in stand-alone applications.
Change history (5)
comment:1 by , 16 years ago
Type: | defect → enhancement |
---|
comment:2 by , 16 years ago
Description: | modified (diff) |
---|
comment:3 by , 16 years ago
Milestone: | 3.0 → 4.0 |
---|
comment:4 by , 15 years ago
See r2254.
Parameter msg_MODE controls the level of output diagnostic information output by ROPP routines. This parameter may be used to selectively define required output messages from within sub-routines, or define the appropriate level of info/warning/error message output to print from ropp_messages library.
The available options are:
QuietMode - only output error messages to stderr, no info/warnings NormalMode - output all info and warnings to stdout, errors to stderr VerboseMode - as NormalMode, but also output diagnostic/debug messages as specified within an individual subroutine.
The required msg_MODE may be altered either within a program routine, e.g.
msg_MODE = VerboseMode ! Enable all messages CALL message(msg_diag, "The result is....") msg_MODE = NormalMode ! Re-set to normal level
or by implicitly setting the default value below and re-compiling, or by setting the environment variable ROPP_MSG_MODE on the command line. The environment variable is checked the first time the messages library is called from within a program (and flag msg_MODE_READ is set to TRUE to prevent further reading of the environment variable on subsequent calls). Any further change to msg_MODE from within a program takes precendent over the environment variable setting, which itself preceeds the default setting in this module at compile-time.
ropp_io routines have now been updated to use ropp_messages for writing to stderr/stdout. Improved use of the msg_diag message type for outputting DEBUG type information (suitable for VerboseMode operation) in other ropp modules will continue.
Ticket remains open as reminder to update appropriate documentation.
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
User Guides (Appendix A) updated with details of new messages implementation described above.
Ticket now closed as fixed.
Note #135 is also relevant to this ticket, and has been closed to merge with this ticket.
The review of messages still needs to be done. Ticket remains open for work towards ROPP-4.