|
EMBOSS: C2 Error Messages
|
EMBOSS can write messages at the following levels: FATAL, ERROR, WARN,
INFO. Currently FATAL writes to standard error and abort
the application while the others write to standard error and
continue. These could be divided in various ways, but all error calls
have to follow any agreed convention.
Issues:
- Error messages are simple text with "ERROR:" etc. to
indicate the level. Further information could be added automatically
(source file, line number, error numbers to use a central error
message list, etc.)
- Line numbers and source files are provided by a macro for coding
errors.
- Error messages should be parsed by scripts when an application
fails, so they need a standard format that can be recognised. Work
on this is still in progress.
- Error messages could be duplicated in files, and written using an
error code. SRS does this, but EMBOSS still uses text in the source code.
- Numbered messages can be checked by an output parser against
expected error codes. The number should appear in the message, and
should be used as the abort code if the program terminates.
Again, this is not yet implemented.
- Unnumbered messages should also be available, with a general
default code to replace the number.
- Standard error messages (out of memory, bad sequence format)
could be set by codes to standardise them where they may be
generated in more than one source code line. At present, these depend
on a single call to write the error message.