diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-07-26 09:50:08 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-07-26 09:50:08 -0230 |
commit | b9ad54c51e259d37f6c7a63861a7485d6a9c13c2 (patch) | |
tree | 6aa77442feab456935946b51932ce3156e833755 /cpp/src/Ice/PropertiesI.cpp | |
parent | Added Java life cycle demo. Fixed a few style issues and a bug (diff) | |
download | ice-b9ad54c51e259d37f6c7a63861a7485d6a9c13c2.tar.bz2 ice-b9ad54c51e259d37f6c7a63861a7485d6a9c13c2.tar.xz ice-b9ad54c51e259d37f6c7a63861a7485d6a9c13c2.zip |
bug 1728 - print warning is numeric property not set to numeric value
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; } } |