Do not throw exception for normal code flow (removed exceptions::no_object_found).
This commit is contained in:
parent
7aebeeb2e2
commit
2bbf3eac25
@ -274,18 +274,6 @@ exception* no_recipient::clone() const { return new no_recipient(*this); }
|
|||||||
const char* no_recipient::name() const throw() { return "no_recipient"; }
|
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
|
// no_such_property
|
||||||
//
|
//
|
||||||
|
@ -381,7 +381,7 @@ shared_ptr <const htmlTextPart::embeddedObject> htmlTextPart::findObject(const s
|
|||||||
return *o;
|
return *o;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw exceptions::no_object_found();
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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.
|
/** There is no property with that name in the set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -154,9 +154,9 @@ public:
|
|||||||
|
|
||||||
/** Return the embedded object with the specified identifier.
|
/** Return the embedded object with the specified identifier.
|
||||||
*
|
*
|
||||||
* @throw exceptions::no_object_found() if no object has been found
|
|
||||||
* @param id object identifier
|
* @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;
|
shared_ptr <const embeddedObject> findObject(const string& id) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user