Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

nederror.h

00001 //==========================================================================
00002 // nederror.h  - part of the OMNeT++ Discrete System Simulation System
00003 //
00004 // Contents:
00005 //   error handling functions
00006 //
00007 //==========================================================================
00008 
00009 /*--------------------------------------------------------------*
00010   Copyright (C) 2002-2003 Andras Varga
00011 
00012   This file is distributed WITHOUT ANY WARRANTY. See the file
00013   `license' for details on this and other legal matters.
00014 *--------------------------------------------------------------*/
00015 
00016 #ifndef __NEDERROR_H
00017 #define __NEDERROR_H
00018 
00019 #include "nedelement.h"
00020 
00025 void NEDError(NEDElement *context, const char *message, ...);
00026 
00030 bool errorsOccurred();
00031 
00035 void clearErrors();
00036 
00037 #define INTERNAL_ERROR0(context,msg) NEDInternalError(__FILE__,__LINE__,context,msg)
00038 #define INTERNAL_ERROR1(context,msg,arg1) NEDInternalError(__FILE__,__LINE__,context,msg,arg1)
00039 #define INTERNAL_ERROR2(context,msg,arg1,arg2)   NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2)
00040 #define INTERNAL_ERROR3(context,msg,arg1,arg2,arg3) NEDInternalError(__FILE__,__LINE__,context,msg,arg1,arg2,arg3)
00041 
00047 void NEDInternalError(const char *file, int line, NEDElement *context, const char *message, ...);
00048 
00049 
00053 class NEDException
00054 {
00055   protected:
00056     std::string errormsg;
00057 
00058   public:
00062     NEDException(const char *msg,...);
00063 
00067     const char *errorMessage() {return errormsg.c_str();}
00068 };
00069 
00070 
00071 #endif
00072 

Generated at Mon Jun 16 23:37:40 2003 for OMNeT++NEDXML by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001