diff options
author | Vincent Richard <[email protected]> | 2013-11-23 08:35:58 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-11-23 08:35:58 +0000 |
commit | 2bbf3eac25c92e12c2ffef713ef3c8cbca541ca8 (patch) | |
tree | 87de939bca2c3d0ff435b37d4825a78bcb4549e3 | |
parent | Do not throw exception for normal code flow (exceptions::no_such_parameter). (diff) | |
download | vmime-2bbf3eac25c92e12c2ffef713ef3c8cbca541ca8.tar.gz vmime-2bbf3eac25c92e12c2ffef713ef3c8cbca541ca8.zip |
Do not throw exception for normal code flow (removed exceptions::no_object_found).
-rw-r--r-- | src/exception.cpp | 12 | ||||
-rw-r--r-- | src/htmlTextPart.cpp | 2 | ||||
-rw-r--r-- | vmime/exception.hpp | 12 | ||||
-rw-r--r-- | vmime/htmlTextPart.hpp | 4 |
4 files changed, 3 insertions, 27 deletions
diff --git a/src/exception.cpp b/src/exception.cpp index 3ea6e25a..e1f40ce4 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -275,18 +275,6 @@ const char* no_recipient::name() const throw() { return "no_recipient"; } // -// no_object_found -// - -no_object_found::~no_object_found() throw() {} -no_object_found::no_object_found(const exception& other) - : exception("No object found.", other) {} - -exception* no_object_found::clone() const { return new no_object_found(*this); } -const char* no_object_found::name() const throw() { return "no_object_found"; } - - -// // no_such_property // diff --git a/src/htmlTextPart.cpp b/src/htmlTextPart.cpp index 680d3955..44459336 100644 --- a/src/htmlTextPart.cpp +++ b/src/htmlTextPart.cpp @@ -381,7 +381,7 @@ shared_ptr <const htmlTextPart::embeddedObject> htmlTextPart::findObject(const s return *o; } - throw exceptions::no_object_found(); + return null; } diff --git a/vmime/exception.hpp b/vmime/exception.hpp index f1a5e1a3..386f9ce0 100644 --- a/vmime/exception.hpp +++ b/vmime/exception.hpp @@ -290,18 +290,6 @@ public: }; -class VMIME_EXPORT no_object_found : public vmime::exception -{ -public: - - no_object_found(const exception& other = NO_EXCEPTION); - ~no_object_found() throw(); - - exception* clone() const; - const char* name() const throw(); -}; - - /** There is no property with that name in the set. */ diff --git a/vmime/htmlTextPart.hpp b/vmime/htmlTextPart.hpp index 9596f3f4..4c1a8632 100644 --- a/vmime/htmlTextPart.hpp +++ b/vmime/htmlTextPart.hpp @@ -154,9 +154,9 @@ public: /** Return the embedded object with the specified identifier. * - * @throw exceptions::no_object_found() if no object has been found * @param id object identifier - * @return embedded object with the specified identifier + * @return embedded object with the specified identifier, or NULL if + * no object has been found */ shared_ptr <const embeddedObject> findObject(const string& id) const; |