00001 #ifndef __INSTANTIO_EXCEPTION_H
00002 #define __INSTANTIO_EXCEPTION_H
00003
00004 #ifdef _MSC_VER
00005 # pragma once
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "InstantIODef.h"
00027 #include <string>
00028
00029
00030 namespace InstantIO
00031 {
00032
00033
00040 class INSTANTIO_DLLMAPPING Exception
00041 {
00042 public:
00043
00047 inline Exception(): msg_() {}
00048
00053 inline explicit Exception(const std::string &msg): msg_(msg) {}
00054
00060 inline Exception(const Exception &other): msg_(other.msg_) {}
00061
00066 inline const char *what() const { return msg_.c_str(); }
00067
00068 protected:
00069
00071 std::string msg_;
00072
00073 private:
00074
00076 const Exception &operator=(const Exception &);
00077 };
00078
00079
00080 }
00081
00082
00083 #endif // __INSTANTIO_EXCEPTION_H