diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-04-11 23:06:13 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-04-11 23:06:13 +0200 |
commit | f00f5c3ffbc72652568c75de6e48e41b3275fb0a (patch) | |
tree | 748913901fe05864d8cd83b6fceba3ae6f6d9621 /src/xmpp/xmpp_stanza.cpp | |
parent | a20c60a0d84f2f22777e3831cac1315302b7a095 (diff) | |
download | biboumi-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.cpp | 4 |
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 ""; } } |