|
|
|
|
|
by karmakaze
1720 days ago
|
|
The Java implementation of checked exceptions suffers from the scalability issue as described. As long as each consumed package wraps its dependencies checked exceptions into not too many kinds this could be workable. In practice though this isn't how it goes and exceptions in signatures grow based on changing versions of dependencies and their dependencies so either exceptions signatures change by version, or lie. Two other things that mess all of that up if you manage to get it right: (1) RuntimeExceptions which ought to be checked, e.g. NumberFormatException and other common (not so exceptional) cases, (2) sneaky throws that subvert the unsound type system, which can be convenient to work-around the problems above but leave you with less confidence overall. |
|