[m-dev.] For review: warn rather than abort for MERCURY_OPTIONS not applicable to current grade
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Aug 5 18:02:41 AEST 1998
On 05-Aug-1998, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> Can somebody review this? In particular, I'd like to know whether I'm using
> an appropriate method for printing warning messages, whether they are of an
> appropriate format, and whether printing anything at all is appropriate (as
> opposed to just remaining silent).
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");
}
However, currently we don't. I'd be very happy if someone added one.
Regarding the actual warning messages in your change, it may be
worth mentioning "MERCURY_OPTIONS" in the warning messages.
Otherwise, your change looks fine.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list