HandlerFeedGenerator: Error when cat does not exists (instead of empty feed)
This commit is contained in:
parent
5bb3f55945
commit
ba06d04a08
@ -21,6 +21,10 @@ std::vector<HandlerFeedGenerator::EntryRevisionPair> HandlerFeedGenerator::fetch
|
|||||||
auto categoryDao = this->database->createCategoryDao();
|
auto categoryDao = this->database->createCategoryDao();
|
||||||
for(std::string cat : categories)
|
for(std::string cat : categories)
|
||||||
{
|
{
|
||||||
|
if(!categoryDao->find(cat))
|
||||||
|
{
|
||||||
|
throw std::runtime_error("No such category");
|
||||||
|
}
|
||||||
auto catmembers = categoryDao->fetchMembers(cat, option);
|
auto catmembers = categoryDao->fetchMembers(cat, option);
|
||||||
std::copy(catmembers.begin(), catmembers.end(), std::inserter(members, members.end()));
|
std::copy(catmembers.begin(), catmembers.end(), std::inserter(members, members.end()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user