2 ms·
I think the problem isn't so much with checked exceptions as it is with designing a throws clause for interface methods that is both useful and general enough.
by fauigerzigerk 10y ago
I think the problem isn't so much with checked exceptions as it is with designing a throws clause for interface methods that is both useful and general enough.
The point of interfaces is to abstract from the concrete implementation. But that also means that the API designer cannot possibly know what types of exceptions concrete interface implementations can throw.
You're left with the choice of either declaring "throws Exception" on all/most interface methods or using unchecked exceptions.