John Wilson wrote: >Ryan Hoegg wrote: > > >>Hello, >> >>I was wondering if there is any reason that XmlRpc.parse() throws a >>raw Exception? (line 342, XmlRpc.java, CVS from today about an hour >>ago) >> >>Why not create an IncompleteParserClassException or some such? >> >> > >What advantage would that give us? > >It's a method with only package visability. It only throws an Exception in >one case this is wrapped in a ParseFailed exception which is then seen by >code outside the package. > >It seams a reasonable design decision to me. > >John Wilson >The Wilson Partnership >http://www.wilson.co.uk > Well I refactored a piece of the XmlRpcClient.execute method that included the call to XmlRpc.parse(). My new method must now catch an Exception, while some of its internal details may throw a different exception. I left the original Exception alone, but it made my task slightly more complicated. I just decided to leave it how it is and leave the change to future refactorings.
-- Ryan Hoegg