How's that different? The only thing you just told me is that you want
to turn "forgot to do something with checked exception" from error to
warning, which is close to a no-op in my book - I can delve into the
eclipse compile settings and change a plethora of problems around from
error to warning to ignore.

The point is this: You *STILL* need a way to say: I know, stop warning
me. Code ought to be warning free (those code shops that ignore
warnings are not places I'm going to work particularly well in!) -
@SuppressWarnings("throws") is a bit drastic as now ANY omission of
handling a checked exception anywhere in this code is going to go by
unnoticed, and it also doesn't help readability because it doesn't
list which particular kind of exception I'm actively going to ignore.
So, we'd need a more specific warning suppression system. Which is
going to look pretty much exactly like throws vs. sneakyThrows.

On Sep 23, 10:30 pm, Josh Berry <tae...@gmail.com> wrote:
> On Thu, Sep 23, 2010 at 3:21 PM, Reinier Zwitserloot 
> <reini...@gmail.com>wrote:
>
> > Because there's use in having the compiler be your pair programmer.
> > It's nice when your compiler tells you: Hey, uh, did you think about
> > FileNotFoundException?
>
> > I'm just asking for the ability to say: Yes, I did, thanks for
> > reminding me - without having to jump through bizarre hoops like you
> > have to do today.
>
> > That's what checked exceptions ought to be: This condition is usually
> > both expectable and handleable, so please remind my API user.
>
> But.... what you are proposing is a way to promote any checked exception to
> a non-checked exception.  Why bother when you can just make them all
> non-checked?  You could simply rename "sneakyThrows" to "throws" and just
> have all declared and non-caught exceptions be warnings.  Done. :)

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

Reply via email to