Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!van-bc!jtc From: jtc@van-bc.wimsey.bc.ca (J.T. Conklin) Newsgroups: comp.misc Subject: Fixing error messages (was Re: A tirade about inefficient software & systems) Message-ID: <23@van-bc.wimsey.bc.ca> Date: 1 Nov 90 01:11:56 GMT References: <1990Oct29.232733.2065@sctc.com> <3341@tantalum.UUCP> Organization: UniFax Communications Inc., Vancouver, B.C., Canada Lines: 18 In article peter@ficc.ferranti.com (Peter da Silva) writes: >I'd be satisfied if one of them went through their source and whenever >they have !fprintf(stderr, "Can't open %s\n", file);! replaced it with >!perror(file)!. I think you're on the right track. But if vendors could be convinced to change their error messages, I'd prefer something like this: fprintf(stderr, "%s: Can't open %s: %s\n", progname, strerror(errno)); As the program name, the kind of error the program "thinks" has happend, and the perror() style error message are all present. --jtc -- J.T. Conklin UniFax Communications Inc. ...!{uunet,ubc-cs}!van-bc!jtc, jtc@wimsey.bc.ca