TestReceiver::receive (Transmitter::Channel chn, const char * str)
{
const char *prefix = "";
-
+
switch (chn) {
case Transmitter::Error:
prefix = ": [ERROR]: ";
/* this isn't supposed to happen */
abort ();
}
-
+
/* note: iostreams are already thread-safe: no external
lock required.
*/
-
+
std::cout << prefix << str << std::endl;
-
+
if (chn == Transmitter::Fatal) {
::exit (9);
}