Sometimes the only way things ever got fixed is because people became uncomfortable.
How do you do that? I have tried that sort of thing and never succeeded. I don't know enough C++ but I heard somewhere that a C++ exception behaves like a checked exception if it is dcelared as possibly thrown, and unchecked if it is not so declared.Tim Holloway wrote:. . . . you can specify a RuntimeException explicitly as checked . . . .
The theory, I have read somewhere, is that a runtime exception is thrown because of an occurrence entirely inside the runtime and a checked exception is thrown because of an occurrence at least partially outside the runtime. Now tell me how something like InputMismatchException and InterruptedException fit into those categories.the people who named RuntimeException . . .
Sometimes the only way things ever got fixed is because people became uncomfortable.
Sometimes the only way things ever got fixed is because people became uncomfortable.
. . . sounds a good idea. . . . But I don't think it exists in Java®.Tim Holloway wrote:. . . a language definition that required a caller seeing an explicit unchecked declaration to require handling it in the calling routine . . .
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
|