(file) Return to ConfigExceptions.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Config

  1 karl  1.8 //%2003////////////////////////////////////////////////////////////////////////
  2 mike  1.2 //
  3 karl  1.8 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
  4           // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
  6           // IBM Corp.; EMC Corporation, The Open Group.
  7 mike  1.2 //
  8           // Permission is hereby granted, free of charge, to any person obtaining a copy
  9           // of this software and associated documentation files (the "Software"), to
 10           // deal in the Software without restriction, including without limitation the
 11           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12           // sell copies of the Software, and to permit persons to whom the Software is
 13           // furnished to do so, subject to the following conditions:
 14 kumpf 1.3 // 
 15 mike  1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23           //
 24           //==============================================================================
 25           //
 26           // Author: Nag Boranna (nagaraja_boranna@hp.com)
 27           //
 28           // Modified By:
 29           //
 30           //%/////////////////////////////////////////////////////////////////////////////
 31           
 32           
 33           ////////////////////////////////////////////////////////////////////////////////
 34           //  This file contains the exception classes used in the configuration
 35           //  classes.
 36 mike  1.2 ////////////////////////////////////////////////////////////////////////////////
 37           
 38           #ifndef Pegasus_ConfigExceptions_h
 39           #define Pegasus_ConfigExceptions_h
 40           
 41           #include <Pegasus/Common/Exception.h>
 42           #include <Pegasus/Config/Linkage.h>
 43 humberto 1.7 #include <Pegasus/Common/MessageLoader.h> //l10n
 44 mike     1.2 
 45              PEGASUS_NAMESPACE_BEGIN
 46              
 47              
 48              /** 
 49              MissingCommandLineOptionArgument Exception class 
 50              */
 51              class MissingCommandLineOptionArgument : public Exception
 52              {
 53              public:
 54 humberto 1.7 //l10n
 55                  //MissingCommandLineOptionArgument(const String& optionName)
 56                      //: Exception("Missing command line option argument: " + optionName) { }
 57 mike     1.2     MissingCommandLineOptionArgument(const String& optionName)
 58 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.MISSING_CMDLINE_OPTION",
 59                      				"Missing command line option argument: $0",
 60                      				optionName)) { }
 61 mike     1.2 };
 62              
 63 kumpf    1.4 /** 
 64              UnrecognizedCommandLineOption Exception class 
 65              */
 66              class UnrecognizedCommandLineOption : public Exception
 67              {
 68              public:
 69                  //UnrecognizedCommandLineOption(const String& optionName)
 70 humberto 1.7     //l10n
 71                  //UnrecognizedCommandLineOption()
 72                      //: Exception("Unrecognized command line option. ") { }
 73 kumpf    1.4     UnrecognizedCommandLineOption()
 74 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.UNRECOGNIZED_CMDLINE_OPTION",
 75                      				"Unrecognized command line option. ")) { }
 76 kumpf    1.4 };
 77              
 78 mike     1.2 
 79              /** 
 80              InvalidPropertyValue Exception class 
 81              */
 82              class InvalidPropertyValue : public Exception
 83              {
 84              public:
 85 humberto 1.7 //l10n
 86                  //InvalidPropertyValue(const String& name, const String& value)
 87                      //: Exception("Invalid property value: " + name + "=" + value ) { }
 88 mike     1.2     InvalidPropertyValue(const String& name, const String& value)
 89 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.INVALID_PROPERTY_VALUE",
 90                      						"Invalid property value: $0=$1",
 91                      						name,
 92                      						value )) { }
 93 mike     1.2 };
 94              
 95              
 96              /** 
 97              DuplicateOption Exception class 
 98              */
 99              class DuplicateOption : public Exception
100              {
101              public:
102 humberto 1.7 //l10n
103                  //DuplicateOption(const String& name)
104                      //: Exception("Duplicate option: " + name) { }
105 mike     1.2     DuplicateOption(const String& name)
106 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.DUPLICATE_OPTION",
107                      						       "Duplicate option: $0",
108                      						       name)) { }
109 mike     1.2 };
110              
111              
112              /** 
113              ConfigFileSyntaxError Exception class 
114              */
115              class ConfigFileSyntaxError : public Exception
116              {
117              public:
118                  ConfigFileSyntaxError(const String& file, Uint32 line)
119                      : Exception(_formatMessage(file, line)) { }
120              
121                  static String _formatMessage(const String& file, Uint32 line);
122              };
123              
124              
125              /** 
126              UnrecognizedConfigFileOption Exception class 
127              */
128              class UnrecognizedConfigFileOption : public Exception
129              {
130 mike     1.2 public:
131 humberto 1.7 //l10n
132                  //UnrecognizedConfigFileOption(const String& name)
133                      //: Exception("Unrecognized config file option: " + name) { }
134 mike     1.2     UnrecognizedConfigFileOption(const String& name)
135 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.UNRECOGNIZED_CONFIG_FILE_OPTION",
136                      							   "Unrecognized config file option: $0",
137                      							   name)) { }
138 mike     1.2 };
139              
140              
141              /** 
142              MissingRequiredOptionValue Exception class 
143              */
144              class MissingRequiredOptionValue : public Exception
145              {
146              public:
147 humberto 1.7 //l10n
148                  //MissingRequiredOptionValue(const String& name)
149                      //: Exception("Missing required option value: " + name) { }
150 mike     1.2     MissingRequiredOptionValue(const String& name)
151 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.MISSING_REQUIRED_OPTION",
152                      							   "Missing required option value: $0",
153                      							   name)) { }
154 mike     1.2 };
155              
156              
157              /** 
158              UnrecognizedConfigProperty Exception class 
159              */
160              class UnrecognizedConfigProperty : public Exception
161              {
162              public:
163 humberto 1.7 //l10n
164                  //UnrecognizedConfigProperty(const String& name)
165                      //: Exception("Unrecognized config property: " + name) { }
166 mike     1.2     UnrecognizedConfigProperty(const String& name)
167 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.UNRECOGNIZED_CONFIG_PROPERTY",
168                      							   "Unrecognized config property: $0",
169                      							   name)) { }
170 mike     1.2 };
171              
172              /** 
173              NonDynamicConfigProperty Exception class 
174              */
175              class NonDynamicConfigProperty : public Exception
176              {
177              public:
178 humberto 1.7 //l10n
179                  //NonDynamicConfigProperty(const String& name)
180                      //: Exception("NonDynamic config property: " + name) { }
181 mike     1.2     NonDynamicConfigProperty(const String& name)
182 humberto 1.7         : Exception(MessageLoaderParms("Config.ConfigExceptions.NONDYNAMIC_CONFIG_PROPERTY",
183                      							   "NonDynamic config property: $0",
184                      							   name)) { }
185 mike     1.2 };
186              
187              PEGASUS_NAMESPACE_END
188              
189              #endif /* Pegasus_ConfigExceptions_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2