Article View: mod.std.unix
Article #131Re: standardized error messages
From: John Quarterman
Date: Thu, 25 Jul 1985 14:55
Date: Thu, 25 Jul 1985 14:55
47 lines
2795 bytes
2795 bytes
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)
Technical Details
Message-ID:
<2474@ut-sally.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!ut-sally!jsqReferences:
<2391@ut-sally.UUCP> <2461@ut-sally.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ut-sally.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!ut-sally!jsq From: jsq@ut-sally.UUCP (John Quarterman) Newsgroups: mod.std.unix Subject: Re: standardized error messages Message-ID: <2474@ut-sally.UUCP> Date: Thu, 25-Jul-85 10:55:26 EDT Article-I.D.: ut-sally.2474 Posted: Thu Jul 25 10:55:26 1985 Date-Received: Fri, 26-Jul-85 04:57:53 EDT References: <2391@ut-sally.UUCP> <2461@ut-sally.UUCP> Reply-To: std-unix@ut-sally.UUCP Organization: U. Texas CS Dept., Austin, Texas Lines: 47 Approved: jsq@ut-sally.UUCP