Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ConfigurationExceptions.h

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: ConfigurationExceptions.h,v 1.3 2004/05/19 15:56:58 mmarsh Exp $
00008 //
00009 // $Log: ConfigurationExceptions.h,v $
00010 // Revision 1.3  2004/05/19 15:56:58  mmarsh
00011 // *** empty log message ***
00012 //
00013 // Revision 1.2  2003/11/04 22:31:50  mmarsh
00014 // *** empty log message ***
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 /* __CODEX_SERVER_CONFIGURATIONEXCEPTIONS_H__ */

Generated on Fri May 6 17:38:58 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1