Skip to content

Commit

Permalink
PHOTARK-3 - Adding exception handling to avoid issues when album feed…
Browse files Browse the repository at this point in the history
… is not accessible

git-svn-id: https://svn.apache.org/repos/asf/incubator/photark/trunk@764071 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
lresende committed Apr 10, 2009
1 parent 7ba121a commit b61ce86
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions assets/src/main/java/services/AlbumAgregator.java
Expand Up @@ -48,17 +48,25 @@ public void init() {
}

if (albumFeed != null) {
for(org.apache.abdera.model.Entry feedPicture : albumFeed.getFeed().getEntries()) {
String feedImageLink = feedPicture.getEnclosureLinkResolvedHref().toString();
pictures.add(feedImageLink);
}
try {
for(org.apache.abdera.model.Entry feedPicture : albumFeed.getFeed().getEntries()) {
String feedImageLink = feedPicture.getEnclosureLinkResolvedHref().toString();
pictures.add(feedImageLink);
}
}catch (Exception e) {
//log exception, warn user that album xxx was not processed (not found)
}
}

if( albumPicassa != null) {
for(com.google.gdata.data.Entry picassaPicture : albumPicassa.getFeed().getEntries()) {
String feedImageLink = picassaPicture.getLink(Link.Rel.MEDIA_EDIT, null).getHref();
pictures.add(feedImageLink);
}
try {
for(com.google.gdata.data.Entry picassaPicture : albumPicassa.getFeed().getEntries()) {
String feedImageLink = picassaPicture.getLink(Link.Rel.MEDIA_EDIT, null).getHref();
pictures.add(feedImageLink);
}
}catch (Exception e) {
//log exception, warn user that album xxx was not processed (not found)
}
}

}
Expand Down

0 comments on commit b61ce86

Please sign in to comment.