summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_stanza.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-04-11 23:06:13 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-04-11 23:06:13 +0200
commitf00f5c3ffbc72652568c75de6e48e41b3275fb0a (patch)
tree748913901fe05864d8cd83b6fceba3ae6f6d9621 /src/xmpp/xmpp_stanza.cpp
parenta20c60a0d84f2f22777e3831cac1315302b7a095 (diff)
downloadbiboumi-f00f5c3ffbc72652568c75de6e48e41b3275fb0a.tar.gz
biboumi-f00f5c3ffbc72652568c75de6e48e41b3275fb0a.tar.bz2
biboumi-f00f5c3ffbc72652568c75de6e48e41b3275fb0a.tar.xz
biboumi-f00f5c3ffbc72652568c75de6e48e41b3275fb0a.zip
Do not use exceptions for missing tags, improvement in code simplicity
Diffstat (limited to 'src/xmpp/xmpp_stanza.cpp')
-rw-r--r--src/xmpp/xmpp_stanza.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmpp/xmpp_stanza.cpp b/src/xmpp/xmpp_stanza.cpp
index 23b2d25..948e5f5 100644
--- a/src/xmpp/xmpp_stanza.cpp
+++ b/src/xmpp/xmpp_stanza.cpp
@@ -216,7 +216,7 @@ bool XmlNode::has_children() const
return !this->children.empty();
}
-const std::string& XmlNode::operator[](const std::string& name) const
+const std::string XmlNode::get_tag(const std::string& name) const
{
try
{
@@ -225,7 +225,7 @@ const std::string& XmlNode::operator[](const std::string& name) const
}
catch (const std::out_of_range& e)
{
- throw AttributeNotFound();
+ return "";
}
}