[m-dev.] For review: warn rather than abort for MERCURY_OPTIONS

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Aug 20 00:11:03 AEST 1998


Warwick Harvey, you wrote:
> 
> Fergus writes:
> > We ought to have a single function called say MR_warning()
> > for printing warning messages, something like this:
> > 
> > 	void
> > 	MR_warning(const char *msg, ...)
> > 	{
> > 		va_list args;
> > 
> > 		fprintf(stderr, "Mercury runtime: ");
> > 		va_start(args, msg);
> > 		vfprintf(stderr, args);
> > 		va_end(args);
> > 		fprintf(stderr, "\n");
> > 	}
> 
> This is different from fatal_error() in that fatal_error() only allows a 
> string; no arguments.  Would it be useful to change fatal_error() to take 
> extra arguments as well at the same time?

Yes, I think so.  But it's not big deal either way.

-- 
Fergus Henderson              | Designing grand concepts is fun;
fjh at cs.mu.oz.au               | finding nitty little bugs is just work.
http://www.cs.mu.oz.au/~fjh   | -- Brooks, in "The Mythical Man-Month".
PGP key fingerprint: 00 D7 A2 27 65 09 B6 AC  8B 3E 0F 01 E7 5D C4 3F



More information about the developers mailing list