Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!hc!beta!cmcl2!rutgers!bellcore!faline!ulysses!sfmag!sfsup!mpl From: mpl@sfsup.UUCP Newsgroups: comp.lang.c Subject: Re: Pet peeve #1473 Message-ID: <1945@sfsup.UUCP> Date: Thu, 27-Aug-87 17:56:05 EDT Article-I.D.: sfsup.1945 Posted: Thu Aug 27 17:56:05 1987 Date-Received: Wed, 2-Sep-87 02:06:28 EDT References: <9001@brl-adm.ARPA> <6339@brl-smoke.ARPA> Organization: AT&T-IS, Summit N.J. USA Lines: 27 Summary: my favorite error message(s) In article <6339@brl-smoke.ARPA>, gwyn@brl-smoke.UUCP writes: > 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, [...] > By the way, why not implement strerror() which will be.... Which reminds me, back in the ancient days I implemented an error package for naive users of our software. Our routine was basically: error(severity, what, __FILE__, __LINE__) It printed a message telling the user how severe the error was according to severity. What is what the software was trying to do (ie make directory or whatever). Errno was then examined to print an appropriate message as to *why* the thing failed. Finally, a log file was kept with the user, time, and all the arguments, so if the user called the administrator, he could tell *exactly* what went wrong by looking at the log file and resorting to the source, if necessary. In practice, few people ever called because they couldn't figure out an error message. A message like: "WARNING: can't read the file "foobar": you don't have permission to read it" is pretty obvious. This is how *we* interpreted the UNIX(R) philosophy. The compiler and operating environment (through __FILE__, errno, etc.) provided us with a great way to print meaningful messages - it was up to *us*, the application writers to use the information. Mike Lindner attunix!mpl