aboutsummaryrefslogtreecommitdiff
path: root/src/armnnUtils/DotSerializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnnUtils/DotSerializer.cpp')
-rw-r--r--src/armnnUtils/DotSerializer.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/armnnUtils/DotSerializer.cpp b/src/armnnUtils/DotSerializer.cpp
index 1feea54dbd..3a9df42fbc 100644
--- a/src/armnnUtils/DotSerializer.cpp
+++ b/src/armnnUtils/DotSerializer.cpp
@@ -69,7 +69,7 @@ DotAttributeSet::DotAttributeSet(std::ostream& stream)
DotAttributeSet::~DotAttributeSet()
{
bool doSpace=false;
- for (auto attrib : m_Attributes)
+ for (auto&& attrib : m_Attributes)
{
if (doSpace)
{
@@ -155,7 +155,16 @@ NodeContent::~NodeContent()
ss << "\\l";
}
ss << "}\"";
- GetStream() << ss.str();
+
+ std::string s;
+ try
+ {
+ // Coverity fix: std::stringstream::str() may throw an exception of type std::length_error.
+ s = ss.str();
+ }
+ catch (const std::exception&) { } // Swallow any exception.
+
+ GetStream() << s;
}
DotNode::DotNode(std::ostream& stream, unsigned int nodeId, const char* label)