nederror.h

Go to the documentation of this file.
00001 //==========================================================================
00002 // nederror.h  -
00003 //
00004 //                     OMNeT++/OMNEST
00005 //            Discrete System Simulation in C++
00006 //
00007 // Contents:
00008 //   error handling functions
00009 //
00010 //==========================================================================
00011 
00012 /*--------------------------------------------------------------*
00013   Copyright (C) 2002-2005 Andras Varga
00014 
00015   This file is distributed WITHOUT ANY WARRANTY. See the file
00016   `license' for details on this and other legal matters.
00017 *--------------------------------------------------------------*/
00018 
00019 #ifndef __NEDERROR_H
00020 #define __NEDERROR_H
00021 
00022 #include "nedelement.h"
00023 
00028 void NEDError(NEDElement *context, const char *message, ...);
00029 
00033 bool errorsOccurred();
00034 
00038 void clearErrors();
00039 
00040 #define INTERNAL_ERROR0(context,msg) NEDInternalError(__FILE__,__LINE__,context,msg)
00041 #define INTERNAL_ERROR1(context,msg,arg1) NEDInternalError(__FILE__,__LINE__,context,msg,arg1)
00042 #define INTERNAL_ERROR2(context,msg,arg1,arg2)   NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2)
00043 #define INTERNAL_ERROR3(context,msg,arg1,arg2,arg3) NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2,arg3)
00044 
00050 void NEDInternalError(const char *file, int line, NEDElement *context, const char *message, ...);
00051 
00052 
00056 class NEDException
00057 {
00058   protected:
00059     std::string errormsg;
00060 
00061   public:
00065     NEDException(const char *msg,...);
00066 
00070     const char *errorMessage() {return errormsg.c_str();}
00071 };
00072 
00073 
00074 #endif
00075 

Generated on Sat Oct 21 17:47:58 2006 for OMNeT++/OMNEST NEDXML by  doxygen 1.4.6