Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Pet peeve #1473 Message-ID: <6339@brl-smoke.ARPA> Date: Tue, 25-Aug-87 23:52:24 EDT Article-I.D.: brl-smok.6339 Posted: Tue Aug 25 23:52:24 1987 Date-Received: Thu, 27-Aug-87 06:13:57 EDT References: <9001@brl-adm.ARPA> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 28 In article <9001@brl-adm.ARPA> ultra!wayne@ames.arpa (Wayne Hathaway) writes: >... Sure it takes a >miniscule amount more work to print "Unknown error 666." But you see, >that's *exactly* what I meant by "UNIX philosophy": it's fine as long >as you don't ever make a mistake, but boy if you ever should, then not >only is UNIX not going to help, it's gonna *HIDE* the one piece of >debugging information it has! Apparently what you mean by "UNIX philosophy" has nothing to do with actual UNIX philosophy, since I'm one of the more vocal proponents of the latter and I would not have left out the error number in the message. In fact, two weeks ago I wrote an error-handling package quite similar in spirit to errno and friends, and after trying the best it can to return a meaningful error message, the last resort of the message-finder module is to build a string with the error number in it. The fact that a lot of old UNIX code was implemented in a rush, just to get some job done in a research environment, and was never cleaned up by the commercial vendors does NOT mean that that is recommended practice! By the way, why not implement strerror() which will be required in Standard C, rather than inventing bug-prone, incompatible approaches to the same problem? It would make a nice addition to your C library. extern char *strerror( int errnum );