diff options
author | Vincent Richard <[email protected]> | 2013-11-22 12:32:52 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-11-22 12:32:52 +0000 |
commit | 96077ce7e6125cdba959925d0a2b7b1f8ee54046 (patch) | |
tree | aa478ebd974ce101e8e16d9c6cbab32643725a31 /src/header.cpp | |
parent | Do not throw exception for normal code flow. (diff) | |
download | vmime-96077ce7e6125cdba959925d0a2b7b1f8ee54046.tar.gz vmime-96077ce7e6125cdba959925d0a2b7b1f8ee54046.zip |
Do not throw exception for normal code flow (exceptions::no_such_field).
Diffstat (limited to 'src/header.cpp')
-rw-r--r-- | src/header.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/header.cpp b/src/header.cpp index 8e04cadc..2dc07b8f 100644 --- a/src/header.cpp +++ b/src/header.cpp @@ -171,14 +171,10 @@ shared_ptr <headerField> header::findField(const string& fieldName) const // No field with this name can be found if (pos == m_fields.end()) - { - throw exceptions::no_such_field(); - } + return null; + // Else, return a reference to the existing field - else - { - return (*pos); - } + return (*pos); } |