On 2021-06-27, Gilles Sadowski wrote: > Hi.
>> [...] >> it seemed Gilles was opposed to this idea > Rather (IIRC) my last comment was that it was your choice as to > what the API should look like. Sorry, I didn't mean to misrepresent your POV. > My opinion on the matter was along Gary's lines (which is J. Bloch's > rationale provided in "Effective Java"). > Indeed I personally would indeed *not* pick option 1 because it puts > the onus on the Commons library whereas input that does not comply > with preconditions (i.e. a supported format) should unsurprisingly > throw an IAE. In which case we need to catch all the other RuntimeExceptions and turn them into IAEs, right? :-) Some if we want to throws any other specific RuntimeException following Matt's suggestion. We are already throwing checked IOExceptions for invalid archives in many many cases today. Our users expect us to do so for all invalid archives - well some of them. As I said, we can as well document that each method could throw arbitrary RuntimeExceptions, but I don't believe we can list the kinds of RuntimeExceptions exhaustively - if we knew which exceptions can be thrown, then we could as well check the error conditions ourselves beforehand. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org