nedexception.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __NEDEXCEPTION_H
00018 #define __NEDEXCEPTION_H
00019
00020 #include <string>
00021 #include <exception>
00022 #include <stdexcept>
00023 #include "nedxmldefs.h"
00024
00025 NAMESPACE_BEGIN
00026
00027 class NEDElement;
00028
00032 class NEDXML_API NEDException : public std::runtime_error
00033 {
00034 protected:
00035 std::string errormsg;
00036
00037 public:
00041 NEDException(const char *messagefmt,...);
00042
00046 NEDException(NEDElement *context, const char *messagefmt,...);
00047
00051 virtual ~NEDException() throw() {}
00052
00056 virtual const char *what() const throw() {return errormsg.c_str();}
00057 };
00058
00059
00060 NAMESPACE_END
00061
00062
00063 #endif
00064