Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!tut.cis.ohio-state.edu!n8emr!bluemoon!gamerine From: gamerine@bluemoon.uucp (Glenn Amerine) Newsgroups: comp.lang.c Subject: Re: Managing error strings in C Message-ID: Date: 11 Jan 91 13:58:06 GMT References: <1991Jan10.122227@lotus.lotus.com> Sender: bbs@bluemoon.UUCP Organization: Blue Moon BBS ((614) 868-9980/2/4) Lines: 18 blambert@lotus.lotus.com (Brian Lambert) writes: > Hi: > > I was wondering if anyone out there had any clever ways of handling > error messages in C. That is, in small/medimum size programs one > usually winds up with all sorts of: > > PrintLog("Memory allocation error"); The C Users Group had a real nifty way of doing this with conditional macros to either get the value macro or the message macro, but I tossed it on my "neat-stuff-I-gotta-try" stack and can't find it right now. I'll look for it for you if you want. The thing that really struck me as neat about the method is that it is very easy to keep the right error values with the right error messages. Glenn