[jdom-interest] detach() [eg]

Jason Hunter jhunter at collab.net
Sun Apr 22 22:34:22 PDT 2001

Scott Means wrote:
> It seems to me that one of Jason's major objections is the need to catch a
> random new exception anytime he wants to use the .detach() method, e.g.:
> > >} catch (IllegalXXXException e) {
> The true meaning of this exception is: "You've tried to violate XML
> well-formedness." So maybe it would be a good time to think about a
> general-purpose WellFormednessException that could be thrown for anything
> that would break the document. Unfortunately, it looks like there are
> already a number of Illegal???Exceptions that would fall under this
> umbrella, so I guess it's too late. 

I'm neutral on this issue.  It could be added without breaking backward
compatibility, which is handy.  The downside is it adds another class,
so we'd want to make sure it provided some good use.  Considering all
the Illegal*Exceptions are runtime exceptions, are people likely to need
to do a general catch?


More information about the jdom-interest mailing list