00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __CODEX_SERVER_CONFIGURATIONEXCEPTIONS_H__
00019 #define __CODEX_SERVER_CONFIGURATIONEXCEPTIONS_H__
00020
00021 #include "ServerExceptions.h"
00022
00023 namespace CODEX_Server
00024 {
00026 class BadConfigurationException : public ExceptionBase
00027 {
00028 public :
00030 BadConfigurationException( const string& fname ,
00031 int line ,
00032 const string& config_file ) :
00033 ExceptionBase( fname, line ),
00034 m_config_file( config_file )
00035 {}
00036
00038 virtual ~BadConfigurationException() {}
00039
00040 protected :
00041 void derivedMsg() const;
00042
00044 virtual void errMsg() const = 0;
00045
00046 private :
00047 string m_config_file;
00048 };
00049
00051 class BCParameterNotDefinedException : public BadConfigurationException
00052 {
00053 public :
00055 BCParameterNotDefinedException( const string& fname ,
00056 int line ,
00057 const string& config_file ,
00058 const string& parameter ) :
00059 BadConfigurationException( fname , line , config_file ),
00060 m_parameter( parameter )
00061 {}
00062
00064 virtual ~BCParameterNotDefinedException() {}
00065
00066 protected :
00067 void errMsg() const;
00068
00069 private :
00070 string m_parameter;
00071 };
00072
00074 class BCBadValueException : public BadConfigurationException
00075 {
00076 public :
00078 BCBadValueException( const string& fname ,
00079 int line ,
00080 const string& config_file ,
00081 const string& parameter ) :
00082 BadConfigurationException( fname , line , config_file ),
00083 m_parameter( parameter )
00084 {}
00085
00087 virtual ~BCBadValueException() {}
00088
00089 protected :
00090 void errMsg() const;
00091
00092 private :
00093 string m_parameter;
00094 };
00095
00096 }
00097
00098 #endif