00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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