On Thu, Jun 29, 2023 at 11:43 AM Gilles Sadowski <gillese...@gmail.com> wrote:
> I think I can understand your rationale: Something that can be > corrected at runtime should be signalled by a checked exception. > Right? No, not at all. Recoverability is **not** the distinction between checked and unchecked exceptions. Checked exceptions should arise from conditions outside the program itself, like a malformed file or a broken network connection. Runtime exceptions should arise from issues inside the program, like invoking a method on a variable whose value is null, or passing -28 to a method that will only accept positive numbers. > However I don't understand why you now add "Error" to the mix... Because recoverability is the distinction between Exceptions and Errors. Most of the time exceptions, checked and unchecked, can be recovered from. Errors usually can't be. -- Elliotte Rusty Harold elh...@ibiblio.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org