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