use of com.sun.syndication.io.ParsingFeedException in project xwiki-platform by xwiki.
the class RSSValidator method validate.
@Override
protected void validate(Document document) {
try {
SyndFeedInput input = new SyndFeedInput();
input.build(getDocument());
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (FeedException e) {
if (e instanceof ParsingFeedException) {
ParsingFeedException pfe = (ParsingFeedException) e;
addError(Type.ERROR, pfe.getLineNumber(), pfe.getColumnNumber(), e.getMessage());
} else {
addError(Type.ERROR, -1, -1, e.getMessage());
}
}
}
Aggregations