00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __DSIM_EXCEPTIONS__
00011 #define __DSIM_EXCEPTIONS__
00012
00013 #include <exception>
00014 #include <string>
00015
00016 class dsim_exception : public std::exception
00017 {
00018 public:
00019 dsim_exception();
00020 dsim_exception(const std::string &description);
00021 dsim_exception(const dsim_exception &base);
00022
00023 ~dsim_exception() throw() {};
00024
00025 const char* what() const throw()
00026 {
00027 return desc.c_str();
00028 }
00029 private:
00030 std::string desc;
00031 };
00032
00033 class dsim_type_mismatch_exception : public dsim_exception
00034 {
00035 public:
00036 dsim_type_mismatch_exception();
00037 dsim_type_mismatch_exception(const std::string &description);
00038 };
00039
00040 class dsim_error_exception : public dsim_exception
00041 {
00042 public:
00043 dsim_error_exception(const std::string &description);
00044 };
00045
00046 #endif