00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #pragma once
00025
00026 #ifndef __D_EXCEPTION__
00027 #define __D_EXCEPTION__
00028
00029 #include <stdexcept>
00030 #include <string>
00031 using namespace std;
00032
00033 namespace DUtils {
00034
00036 class DException :
00037 public exception
00038 {
00039 public:
00043 DException(void) throw(): m_message("DUtils exception"){}
00044
00049 DException(const char *msg) throw(): m_message(msg){}
00050
00055 DException(const string &msg) throw(): m_message(msg){}
00056
00060 virtual ~DException(void) throw(){}
00061
00065 virtual const char* what() const throw()
00066 {
00067 return m_message.c_str();
00068 }
00069
00070 protected:
00072 string m_message;
00073 };
00074
00075 }
00076
00077 #endif
00078