|
|
|
|
|
by joexner
1064 days ago
|
|
Checked exceptions give you, essentially, syntactic sugar for handling just a few kinds of exceptions and re-throwing the rest. It's useful when there are one or two error cases you want to retry or handle specially, but you want to just barf any other error up the stack. It's a specific use case but it's prevalent. The downside is that sugar can only separate your error conditions by Java type. If everything is just an Exception, you'll have to use sort out your error cases in code. |
|
Being able to know what exceptions can possibly be thrown at a given point is useful, but seems like a problem better solved through static analysis than by requiring annotations.