diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-08-24 11:28:20 -0400 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-08-24 11:28:20 -0400 |
commit | 9a07052d6711858507faa27ff736d4520b3163e9 (patch) | |
tree | 7fa0a0406be0386a8314b2e8c742f29bf127b70d /cpp/src/Ice/PropertiesI.cpp | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
parent | Squashed commit of the following: (diff) | |
download | ice-9a07052d6711858507faa27ff736d4520b3163e9.tar.bz2 ice-9a07052d6711858507faa27ff736d4520b3163e9.tar.xz ice-9a07052d6711858507faa27ff736d4520b3163e9.zip |
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r-- | cpp/src/Ice/PropertiesI.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp index 4bd8711b351..cc49cd4f78f 100644 --- a/cpp/src/Ice/PropertiesI.cpp +++ b/cpp/src/Ice/PropertiesI.cpp @@ -14,6 +14,7 @@ #include <Ice/LocalException.h> #include <Ice/PropertyNames.h> #include <Ice/Logger.h> +#include <Ice/LoggerUtil.h> #include <fstream> using namespace std; @@ -68,11 +69,14 @@ Ice::PropertiesI::getPropertyAsIntWithDefault(const string& key, Int value) map<string, PropertyValue>::iterator p = _properties.find(key); if(p != _properties.end()) { + Int val = value; p->second.used = true; istringstream v(p->second.value); if(!(v >> value) || !v.eof()) { - return 0; + Warning out(getProcessLogger()); + out << "numeric property " << key << " set to non-numeric value, defaulting to " << val; + return val; } } |