Hi Francesco,

> You're right about [1] and [2] - only, I have just realized now, working on
> SYNCOPE-136, that ignoring this exception can be very dangerous during the
> propagation process. And having it checked helps definitely in this sense.

> Let's put it the other way round: why have it unchecked?

Accordingly Java Best Practices checked exceptions should be used only for 
conditions from which the caller can reasonably be expected to recover.
Runtime exceptions should be used for preconditions violation and for 
programming errors.
If user have real possibility to improve the situation, exception should be 
checked.
Not sure about IncompatiblePolicyException: is it related to passwords format 
only? In this case I tend to change exception back to checked, because user can 
react on exception and try again with improved password.

Cheers,
Andrei. 

> -----Original Message-----
> From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
> Sent: Freitag, 1. Februar 2013 14:37
> To: dev@syncope.apache.org
> Subject: Re: IncompatiblePolicyException was made unchecked
> 
> On 01/02/2013 14:33, Andrei Shakirin wrote:
> > Hi Francesco,
> >
> > I thought it was agreed in [1]. Have seen no objections in [2].
> 
> You're right about [1] and [2] - only, I have just realized now, working on
> SYNCOPE-136, that ignoring this exception can be very dangerous during the
> propagation process. And having it checked helps definitely in this sense.
> 
> > Do you have reasons to keep this exception checked?
> 
> Let's put it the other way round: why have it unchecked?
> 
> Regards.
> 
> > [1]
> >
> https://cwiki.apache.org/confluence/display/SYNCOPE/Remote+Exceptions
> > [2]
> > http://syncope-dev.1063484.n5.nabble.com/Exception-propagation-in-
> Rest
> > -interface-HTTP-header-vs-body-for-details-td5711482.html
> >
> >> -----Original Message-----
> >> From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
> >> Sent: Freitag, 1. Februar 2013 14:12
> >> To: dev@syncope.apache.org
> >> Subject: IncompatiblePolicyException was made unchecked
> >>
> >> Hi all,
> >> I've just noticed that IncompatiblePolicyException, created checked
> >> [1] is now unchecked: any reason for this?
> >>
> >> [1]
> >>
> http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/ja
> >> va
> >>
> /org/apache/syncope/core/util/IncompatiblePolicyException.java?view=m
> >> ar
> >> kup&pathrev=1401200
> 
> --
> Francesco Chicchiriccò
> 
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~ilgrosso/

Reply via email to