home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v1 / text0041.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  2.1 KB

  1. From: John Quarterman (moderator) <std-unix-request@ut-sally>
  2. Topic: Re: standardized error messages
  3.  
  4. ----------------------------------------------------------------------
  5.  
  6. Date: Sun, 21 Jul 85 05:19:11 pdt
  7. From: seismo!nsc!daisy!david (David Schachter)
  8. To: ut-sally!jsq
  9. Subject: Re: standardized error messages
  10. In-Reply-To: <2391@ut-sally.UUCP>
  11.  
  12. Daisy's version of the UNIX(tm) operating system has a standard
  13. way of handling error reporting.  You call a system routine,
  14. passing it an error file number and an error status.  You also
  15. pass a flag saying how to handle the error and substitution var-
  16. iables.  The system looks up the error file number in a table to 
  17. get the names of the error file.  It then looks up in the file the
  18. appropriate error message, using a simple transformation of the
  19. error status as the key.  The strings in the error file are sim-
  20. ilar in format to the 'printf' function thus allowing you to
  21. substitute variables into the error message.
  22.  
  23. The flag you pass tells the system whether to display the message,
  24. add it to the stack, display the entire stack (clearing it), or
  25. jump to the machine monitor with a fatal error.  Obviously, the
  26. latter case is used only when the error is on the order of "system
  27. corrupt."
  28.   
  29. You can also pass an error port id if you do not wish the message
  30. to go to std_err.
  31.   
  32. A subtle advantage of this is that all error messages reside in
  33. external text files, not compiled into the code of the programs.
  34. This results in faster loading, less memory usage, and makes it
  35. easy to change error messages and to enforce consistent style.
  36.   
  37. [This does not represent official policy by Daisy Systems.  The
  38. author speaks only for himself.] {"Where there's a will, there's
  39. a won't."}
  40.  
  41. ------------------------------
  42.  
  43. Discussions-Of: UNIX standards, particularly the IEEE P1003 draft standard.
  44. Submissions-To:    ut-sally!std-unix    or std-unix@ut-sally.ARPA
  45. Comments-To: ut-sally!std-unix-request    or std-unix-request@ut-sally.ARPA
  46. UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix
  47. Archives-In: ~ftp/pub/mod.std.unix on ut-sally.ARPA (soon sally.UTEXAS.EDU)
  48.  
  49. Volume-Number: Volume 1, Number 42
  50.  
  51.