Error functions for Mastermind.

Pablo Castells ([email protected])
Tue, 08 Aug 95 16:23:29 PDT

Hi Kurt,

Can you add to the debug package a couple of functions called MM_Error to
signal errors in our code. Here is how Amulet does it, and it would be usefu
for us to have something similar. Currently the object system calls exit(1)
directly, which is not that useful.

I think the proper place for this would be in debug.h, but please include
them where you think is appropriate.

We will them modify all our code to call MM_Error to signal errors. This
shoud help with debugging in the future.

void Am_Error (const char* error_string)
{
cerr << "** Amulet Error: " << error_string << endl;
cerr << "** Program aborted." << endl;
abort ();
}

void Am_Error ()
{
cerr << "** Amulet Error." << endl;
cerr << "** Program aborted." << endl;
abort ();
}

Pedro and Pablo