diff --git a/src/exception.cpp b/src/exception.cpp index 3ea6e25a..e1f40ce4 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -274,18 +274,6 @@ exception* no_recipient::clone() const { return new no_recipient(*this); } 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 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 findObject(const string& id) const;