abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Constabaris <a...@clownsinmycoffee.net>
Subject Adding "ParseException" to entry.setContent()
Date Sat, 31 Mar 2007 16:41:56 GMT
Issue:

Entry.setContent does not declare any exceptions, and FOMParser swallows 
exception when setContent is called with an X(HT)?ML content type and 
non well-formed X(HT)?ML content.

Proposed Solution:

Create org.apache.abdera.model.InvalidContentException as a 
RuntimeException and add the throws declaration to the javadoc for the 
Entry.setContent() methods; have the FOMParser throw the new exception 
(or a subclass thereof) when it encounters bad content.  Unchecked to 
allow for client code flexibility, since parsing exceptions aren't 
appropriate for all content types and ... "backward compilability" of 
existing client code =)

I'm willing to create a patch if this approach seems like a reasonable one.

AC



Mime
View raw message