00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CEYLAN_EXCEPTION_H_
00028 #define CEYLAN_EXCEPTION_H_
00029
00030
00031 #include "CeylanTextDisplayable.h"
00032
00033
00034 #include <string>
00035 #include <exception>
00036 #include <iosfwd>
00037
00038
00039
00040 namespace Ceylan
00041 {
00042
00043
00044
00056 class CEYLAN_DLL Exception : public std::exception, public TextDisplayable
00057 {
00058
00059
00060 public:
00061
00062
00069 explicit Exception( const std::string & reason ) ;
00070
00071
00073 virtual ~Exception() throw() ;
00074
00075
00076
00087 virtual const std::string toString( VerbosityLevels level = high )
00088 const ;
00089
00090
00091
00103 virtual const char * what() const throw() ;
00104
00105
00106
00107 protected:
00108
00109
00115 std::string _reason ;
00116
00117
00118
00119 private:
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00139 Exception & operator = ( const Exception & source ) ;
00140
00141
00142 } ;
00143
00144 }
00145
00146
00147
00158 std::ostream & operator << ( std::ostream & os, const Ceylan::Exception & e ) ;
00159
00160
00161
00162 #endif // CEYLAN_EXCEPTION_H_
00163