home *** CD-ROM | disk | FTP | other *** search
- From: John Quarterman (moderator) <std-unix-request@ut-sally>
- Topic: Re: standardized error messages
-
- ----------------------------------------------------------------------
-
- Date: Sun, 21 Jul 85 05:19:11 pdt
- From: seismo!nsc!daisy!david (David Schachter)
- To: ut-sally!jsq
- Subject: Re: standardized error messages
- In-Reply-To: <2391@ut-sally.UUCP>
-
- Daisy's version of the UNIX(tm) operating system has a standard
- way of handling error reporting. You call a system routine,
- passing it an error file number and an error status. You also
- pass a flag saying how to handle the error and substitution var-
- iables. The system looks up the error file number in a table to
- get the names of the error file. It then looks up in the file the
- appropriate error message, using a simple transformation of the
- error status as the key. The strings in the error file are sim-
- ilar in format to the 'printf' function thus allowing you to
- substitute variables into the error message.
-
- The flag you pass tells the system whether to display the message,
- add it to the stack, display the entire stack (clearing it), or
- jump to the machine monitor with a fatal error. Obviously, the
- latter case is used only when the error is on the order of "system
- corrupt."
-
- You can also pass an error port id if you do not wish the message
- to go to std_err.
-
- A subtle advantage of this is that all error messages reside in
- external text files, not compiled into the code of the programs.
- This results in faster loading, less memory usage, and makes it
- easy to change error messages and to enforce consistent style.
-
- [This does not represent official policy by Daisy Systems. The
- author speaks only for himself.] {"Where there's a will, there's
- a won't."}
-
- ------------------------------
-
- Discussions-Of: UNIX standards, particularly the IEEE P1003 draft standard.
- Submissions-To: ut-sally!std-unix or std-unix@ut-sally.ARPA
- Comments-To: ut-sally!std-unix-request or std-unix-request@ut-sally.ARPA
- UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix
- Archives-In: ~ftp/pub/mod.std.unix on ut-sally.ARPA (soon sally.UTEXAS.EDU)
-
- Volume-Number: Volume 1, Number 42
-
-