> > So IllegalArgumentException is not from the early Java days?
>
> It is, so what?
> It's the exception I use 99% of the time (to signal failed precondition)?
> It's a runtime exception.
>

When I quote standard exceptions you said:

"if you quote design decisions that date back from the early Java days"


> There should be a difference of action when the code knows the archive is
> > broken in contrast there being a problem with the code reading it (for
> > whatever reason).
>
> The difference does not entail the checked vs unchecked selection.
>

While I'd prefer "Optional", given the context of backward compatibility
and expectations I believe it does.


> One is "sorry, this is an invalid archive" while the other is "something
> > went wrong reading the archive - printStackTrace". If that distinction is
> > not important to you - so be it. To me that's a big difference.
>
> Never said such a thing.
>

Not sure what "thing" you mean exactly but In the very same email you wrote:

"I don't see why the library should be expected to explain in details
why an archive is corrupt; it is good enough that it can detect it..."


> The "sorry, this is an invalid archive" is what makes the situation
> > for me "recoverable".
>
> This is plain wrong:


I am not drawing that straight line to preconditions.
Flows or processes can also have the attribute of "recoverable".


I don't see why the library should be expected to explain in details
> why an archive is corrupt; it is good enough that it can detect it, and
> very good if it can protect the caller from himself


If you don't see the quality difference between "this archive is invalid"
and "could not read the archive" there is really no point to make here.

I think this has again gotten to the point of no longer being useful for
the wider audience.
So never mind - I'll go back to lurking.

cheers,
Torsten

Reply via email to