Search in sources :

Example 1 with FetcherException

use of com.sun.syndication.fetcher.FetcherException in project OpenClinica by OpenClinica.

the class RssReaderServlet method getFeed.

void getFeed(PrintWriter pw) {
    SyndFeed feed = null;
    String htmlFeed = null;
    try {
        feed = feedFetcher.retrieveFeed(new URL(rssUrl));
        htmlFeed = feedHtml(feed);
    } catch (IllegalArgumentException e) {
        // TODO Auto-generated catch block
        htmlFeed = errorFeedHtml(e.getMessage());
        e.printStackTrace();
    } catch (FeedException e) {
        // TODO Auto-generated catch block
        htmlFeed = errorFeedHtml(e.getMessage());
        e.printStackTrace();
    } catch (FetcherException e) {
        htmlFeed = errorFeedHtml(e.getMessage());
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (Exception e) {
        htmlFeed = errorFeedHtml(e.getMessage());
        // TODO Auto-generated catch block
        e.printStackTrace();
    } finally {
        pw.println(htmlFeed);
        pw.close();
    }
}
Also used : SyndFeed(com.sun.syndication.feed.synd.SyndFeed) FetcherException(com.sun.syndication.fetcher.FetcherException) FeedException(com.sun.syndication.io.FeedException) URL(java.net.URL) ServletException(javax.servlet.ServletException) IOException(java.io.IOException) FeedException(com.sun.syndication.io.FeedException) FetcherException(com.sun.syndication.fetcher.FetcherException)

Aggregations

SyndFeed (com.sun.syndication.feed.synd.SyndFeed)1 FetcherException (com.sun.syndication.fetcher.FetcherException)1 FeedException (com.sun.syndication.io.FeedException)1 IOException (java.io.IOException)1 URL (java.net.URL)1 ServletException (javax.servlet.ServletException)1