version 1.17.8.1, 2013/04/06 04:38:16
|
version 1.18, 2012/07/03 11:53:23
|
|
|
#ifndef Pegasus_ConfigExceptions_h | #ifndef Pegasus_ConfigExceptions_h |
#define Pegasus_ConfigExceptions_h | #define Pegasus_ConfigExceptions_h |
| |
#include <Pegasus/Config/Linkage.h> |
|
#include <Pegasus/Common/Exception.h> | #include <Pegasus/Common/Exception.h> |
|
#include <Pegasus/Config/Linkage.h> |
#include <Pegasus/Common/MessageLoader.h> | #include <Pegasus/Common/MessageLoader.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
|
/** |
|
MissingCommandLineOptionArgument Exception class |
|
*/ |
|
class PEGASUS_CONFIG_LINKAGE MissingCommandLineOptionArgument : public Exception |
|
{ |
|
public: |
|
MissingCommandLineOptionArgument(const String& optionName) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.MISSING_CMDLINE_OPTION", |
|
"Missing command line option argument: $0", |
|
optionName)) |
|
{ |
|
} |
|
}; |
|
|
/** | /** |
UnrecognizedCommandLineOption Exception class | UnrecognizedCommandLineOption Exception class |
*/ | */ |
class UnrecognizedCommandLineOption : public Exception |
class PEGASUS_CONFIG_LINKAGE UnrecognizedCommandLineOption : public Exception |
{ | { |
public: | public: |
UnrecognizedCommandLineOption(); |
UnrecognizedCommandLineOption() |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.UNRECOGNIZED_CMDLINE_OPTION", |
|
"Unrecognized command line option. ")) |
|
{ |
|
} |
}; | }; |
| |
| |
|
|
class PEGASUS_CONFIG_LINKAGE InvalidPropertyValue : public Exception | class PEGASUS_CONFIG_LINKAGE InvalidPropertyValue : public Exception |
{ | { |
public: | public: |
InvalidPropertyValue(const String& name, const String& value); |
InvalidPropertyValue(const String& name, const String& value) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.INVALID_PROPERTY_VALUE", |
|
"Invalid property value: $0=$1", |
|
name, |
|
value)) |
|
{ |
|
} |
protected: | protected: |
InvalidPropertyValue(const MessageLoaderParms& theMessage); |
InvalidPropertyValue(const MessageLoaderParms& theMessage) |
|
: Exception(theMessage) |
|
{ |
|
} |
}; | }; |
| |
| |
/** | /** |
InvalidDirectoryPropertyValue Exception class | InvalidDirectoryPropertyValue Exception class |
*/ | */ |
class InvalidDirectoryPropertyValue |
class PEGASUS_CONFIG_LINKAGE InvalidDirectoryPropertyValue |
: public InvalidPropertyValue | : public InvalidPropertyValue |
{ | { |
public: | public: |
InvalidDirectoryPropertyValue(const String& name, const String& value); |
InvalidDirectoryPropertyValue(const String& name, const String& value) |
|
: InvalidPropertyValue(MessageLoaderParms( |
|
"Config.ConfigExceptions.INVALID_DIRECTORY_PROPERTY_VALUE", |
|
"For property $0 specified value $1 is not a directory or " |
|
"the directory is not writeable.", |
|
name, |
|
value)) |
|
{ |
|
} |
|
}; |
|
|
|
/** |
|
InvalidListenAddressPropertyValue Exception class |
|
*/ |
|
class PEGASUS_CONFIG_LINKAGE InvalidListenAddressPropertyValue |
|
: public InvalidPropertyValue |
|
{ |
|
public: |
|
InvalidListenAddressPropertyValue(const String& name, const String& value) |
|
: InvalidPropertyValue(MessageLoaderParms( |
|
"Config.ConfigExceptions.INVALID_LISTENADDRESS_PROPERTY_VALUE", |
|
"For property $0 specified value $1 is not a valid interface " |
|
"address.", |
|
name, |
|
value)) |
|
{ |
|
} |
|
}; |
|
|
|
/** |
|
DuplicateOption Exception class |
|
*/ |
|
class PEGASUS_CONFIG_LINKAGE DuplicateOption : public Exception |
|
{ |
|
public: |
|
DuplicateOption(const String& name) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.DUPLICATE_OPTION", |
|
"Duplicate option: $0", |
|
name)) |
|
{ |
|
} |
}; | }; |
| |
|
|
/** | /** |
ConfigFileSyntaxError Exception class | ConfigFileSyntaxError Exception class |
*/ | */ |
class ConfigFileSyntaxError : public Exception |
class PEGASUS_CONFIG_LINKAGE ConfigFileSyntaxError : public Exception |
{ | { |
public: | public: |
ConfigFileSyntaxError(const String& file, Uint32 line); |
ConfigFileSyntaxError(const String& file, Uint32 line) |
|
: Exception(_formatMessage(file, line)) { } |
| |
static String _formatMessage(const String& file, Uint32 line); | static String _formatMessage(const String& file, Uint32 line); |
}; | }; |
| |
|
|
|
/** |
|
UnrecognizedConfigFileOption Exception class |
|
*/ |
|
class PEGASUS_CONFIG_LINKAGE UnrecognizedConfigFileOption : public Exception |
|
{ |
|
public: |
|
UnrecognizedConfigFileOption(const String& name) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.UNRECOGNIZED_CONFIG_FILE_OPTION", |
|
"Unrecognized config file option: $0", |
|
name)) |
|
{ |
|
} |
|
}; |
|
|
|
|
|
/** |
|
MissingRequiredOptionValue Exception class |
|
*/ |
|
class PEGASUS_CONFIG_LINKAGE MissingRequiredOptionValue : public Exception |
|
{ |
|
public: |
|
MissingRequiredOptionValue(const String& name) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.MISSING_REQUIRED_OPTION", |
|
"Missing required option value: $0", |
|
name)) |
|
{ |
|
} |
|
}; |
|
|
|
|
/** | /** |
UnrecognizedConfigProperty Exception class | UnrecognizedConfigProperty Exception class |
*/ | */ |
class UnrecognizedConfigProperty : public Exception |
class PEGASUS_CONFIG_LINKAGE UnrecognizedConfigProperty : public Exception |
{ | { |
public: | public: |
UnrecognizedConfigProperty(const String& name); |
UnrecognizedConfigProperty(const String& name) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.UNRECOGNIZED_CONFIG_PROPERTY", |
|
"Unrecognized config property: $0", |
|
name)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
NonDynamicConfigProperty Exception class | NonDynamicConfigProperty Exception class |
*/ | */ |
class NonDynamicConfigProperty : public Exception |
class PEGASUS_CONFIG_LINKAGE NonDynamicConfigProperty : public Exception |
{ | { |
public: | public: |
NonDynamicConfigProperty(const String& name); |
NonDynamicConfigProperty(const String& name) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.NONDYNAMIC_CONFIG_PROPERTY", |
|
"NonDynamic config property: $0", |
|
name)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
FailedSaveProperties Exception class | FailedSaveProperties Exception class |
*/ | */ |
class FailedSaveProperties : public Exception |
class PEGASUS_CONFIG_LINKAGE FailedSaveProperties : public Exception |
{ | { |
public: | public: |
FailedSaveProperties(const String& reason); |
FailedSaveProperties(const String& reason) |
|
: Exception(MessageLoaderParms( |
|
"Config.ConfigExceptions.FAILED_SAVE_PROPERTIES", |
|
"Failed to save configuration properties to file: $0. " |
|
"Configuration property not set.", |
|
reason)) |
|
{ |
|
} |
}; | }; |
| |
| |