summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/Util.cpp')
-rw-r--r--cpp/src/IceGrid/Util.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp
index 9c86ec2eba9..00d04bd3bf7 100644
--- a/cpp/src/IceGrid/Util.cpp
+++ b/cpp/src/IceGrid/Util.cpp
@@ -35,6 +35,32 @@ IceGrid::toString(const vector<string>& v, const string& sep)
}
string
+IceGrid::toString(const Ice::Exception& exception)
+{
+ std::ostringstream os;
+ try
+ {
+ exception.ice_throw();
+ }
+ catch(const NodeUnreachableException& ex)
+ {
+ os << ex << ":";
+ os << "\nnode: " << ex.name;
+ os << "\nreason: " << ex.reason;
+ }
+ catch(const DeploymentException& ex)
+ {
+ os << ex << ":";
+ os << "\nreason: " << ex.reason;
+ }
+ catch(const Ice::Exception& ex)
+ {
+ os << ex;
+ }
+ return os.str();
+}
+
+string
IceGrid::getProperty(const PropertySetDescriptor& propertySet, const string& name, const string& def)
{
for(PropertyDescriptorSeq::const_iterator q = propertySet.properties.begin();