Don't use exceptions in CommentProcessor::Get*.

Fixes 3595
This commit is contained in:
Gunnar Beutner 2013-01-31 16:23:02 +01:00
parent 768fd50703
commit 15b260d75e
1 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ void CommentProcessor::RemoveComment(const String& id)
DynamicObject::Ptr owner = GetOwnerByCommentID(id);
if (!owner)
throw_exception(invalid_argument("Comment ID does not exist."));
return;
Dictionary::Ptr comments = owner->Get("comments");
@ -81,7 +81,7 @@ String CommentProcessor::GetIDFromLegacyID(int id)
map<int, String>::iterator it = m_LegacyCommentCache.find(id);
if (it == m_LegacyCommentCache.end())
throw_exception(invalid_argument("Invalid legacy comment ID specified."));
return Empty;
return it->second;
}
@ -98,7 +98,7 @@ Dictionary::Ptr CommentProcessor::GetCommentByID(const String& id)
DynamicObject::Ptr owner = GetOwnerByCommentID(id);
if (!owner)
throw_exception(invalid_argument("Comment ID does not exist."));
return Dictionary::Ptr();
Dictionary::Ptr comments = owner->Get("comments");