Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/global/error.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: error.h,v 1.2 1996/11/21 15:04:03 pechkin Exp $
00003  */
00004 
00005 // Copyright (C) 1995 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Inlined global functions error, warn.
00009 //
00010 // Principal Author: Roger Needham
00011 //
00012 // Status: Useable.
00013 
00014 #ifndef _ERROR_H_
00015 #define _ERROR_H_
00016 
00017 #ifdef __GNUG__
00018 //@jml This tells g++ that error does not return.
00019 inline volatile void error(const char *msg) {
00020 #else
00021 inline void error(const char* msg) {
00022 #endif
00023 
00024   cout << "fatal_error_ {" << msg << '}' << endl << flush;
00025   // Try to shove the message directly out to the front end
00026 
00027   cerr << endl << "Fatal error: " << msg << endl;
00028 
00029   while ( 1 );
00030   // So we can get a stack backtrace when debugging
00031 }
00032 
00033 inline void warn(const char* msg) {
00034   cerr << endl << "Warning: " << msg << endl;
00035 }
00036 
00037 #endif

Generated at Tue Jun 19 09:49:36 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001