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