I actually catch both XmlPullParserException and IOEsception already.

I'm not sure if catching too much (= general Exception) is good, but one can 
argue that any hardcore problem (disk errors, etc) would hit the build shortly 
after anyway. 

So I'll better move to Exception.

txs and LieGrue,
strub

--- On Mon, 1/17/11, Benjamin Bentmann <[email protected]> wrote:

> From: Benjamin Bentmann <[email protected]>
> Subject: Re: MavenXpp3Reader question for maven-release-manager
> To: "Maven Developers List" <[email protected]>
> Date: Monday, January 17, 2011, 11:35 AM
> Mark Struberg wrote:
> 
> > It throws the checked IOException and
> XmlPullParserException, but can it also throw unchecked
> Exceptions under 'normal' conditions?
> 
> AFAIK no.
> 
> > So I'm not sure if I should add a catch (Exception e)
> instead of the 2 checked exceptions, or if all sane cases
> are already wrapped in XmlPullParserException.
> 
> Handling just XmlPullParserException is not enough as
> IOException can also occur. So the generic catch (Exception)
> should fit your needs I think.
> 
> 
> Benjamin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to