There's a school of thought stating that checked exceptions are okay
for domain-level
concepts, but not low-level stuff.
So SaveFailedException would be allowed, but IOException, SqlException and
their derivatives wouldn't.


OTOH, It probably makes more sense to just return a status flag (or some
other way of indicating completion/failure) in methods of this nature, I
usually find that control flow reads more naturally that way.



On 27 June 2010 00:04, Paul King <[email protected]> wrote:

>
> Checked exceptions are a useful language feature and should be used
> liberally in cases where you know all possible use cases for your code in
> advance and require handling of the exceptions by the caller because it
> makes sense for them to always handle it. For code which you want to reuse
> for generic use cases they usually become an anti-pattern.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>



-- 
Kevin Wright

mail/google talk: [email protected]
wave: [email protected]
skype: kev.lee.wright
twitter: @thecoda

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to