summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/MetricsAdminI.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/MetricsAdminI.h')
-rw-r--r--cpp/src/Ice/MetricsAdminI.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/cpp/src/Ice/MetricsAdminI.h b/cpp/src/Ice/MetricsAdminI.h
index 16f21d9971a..260d283a2e2 100644
--- a/cpp/src/Ice/MetricsAdminI.h
+++ b/cpp/src/Ice/MetricsAdminI.h
@@ -219,6 +219,8 @@ public:
return metrics;
}
+ std::string getId() { return _object->id; }
+
private:
friend class MetricsMapT;
@@ -353,24 +355,31 @@ public:
// Compute the key from the GroupBy property.
//
std::string key;
- if(_groupByAttributes.size() == 1)
- {
- key = helper(_groupByAttributes.front());
- }
- else
+ try
{
- std::ostringstream os;
- std::vector<std::string>::const_iterator q = _groupBySeparators.begin();
- for(std::vector<std::string>::const_iterator p = _groupByAttributes.begin(); p != _groupByAttributes.end();
- ++p)
+ if(_groupByAttributes.size() == 1)
{
- os << helper(*p);
- if(q != _groupBySeparators.end())
+ key = helper(_groupByAttributes.front());
+ }
+ else
+ {
+ std::ostringstream os;
+ std::vector<std::string>::const_iterator q = _groupBySeparators.begin();
+ for(std::vector<std::string>::const_iterator p = _groupByAttributes.begin();
+ p != _groupByAttributes.end(); ++p)
{
- os << *q++;
+ os << helper(*p);
+ if(q != _groupBySeparators.end())
+ {
+ os << *q++;
+ }
}
+ key = os.str();
}
- key = os.str();
+ }
+ catch(const std::exception&)
+ {
+ return 0;
}
//