Re: [compress] [Poll] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Matt Juntunen
Adding my two cents here... It's very important to me as a user and developer to have informative errors. If I use compress in my application and a raw NPE or out of bounds exception flies out of the code with little to no context and makes it out to the end user, then I am going to be getting a

Re: [compress] Dealing with uncaught RuntimeExceptions (again)

2021-07-01 Thread Phil Steitz
On 6/29/21 8:08 AM, Stefan Bodewig wrote: On 2021-06-29, Miguel Munoz wrote: Catching all RuntimeExceptions and wrapping them in an IOException looks like the cleanest solution. RuntimeExceptions usually mean bugs, so if the archive code is throwing them due to a corrupted archive, it makes

Re: [compress] [Poll] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Gilles Sadowski
> [...] > > 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"

Re: [compress] [Poll Non Result] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Torsten Curdt
> >> That certainly doesn't prevent anybody else from trying to find a > >> compromise :-) > > > It feels like Optionals could be a compromise. > > I must admit I've lost track of the later discussion threads. If you > mean that we'd return Optional<> results, this would become an entirely >

Re: [compress] [Poll Non Result] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Stefan Bodewig
On 2021-07-01, Torsten Curdt wrote: >> That certainly doesn't prevent anybody else from trying to find a >> compromise :-) > It feels like Optionals could be a compromise. I must admit I've lost track of the later discussion threads. If you mean that we'd return Optional<> results, this would

Re: [compress] [Poll Non Result] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Torsten Curdt
> That certainly doesn't prevent anybody else from trying to find a > compromise :-) > It feels like Optionals could be a compromise.

Re: [compress] [Poll] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Torsten Curdt
> > 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

[compress] [Poll Non Result] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Stefan Bodewig
Hi all there isn't a single option that hasn't at least received two -1s with eight people indicating their preference. So neither option seems to be an option that could lead to a compromise. With this I run out of ideas and will rest my case and not try to find a generic solution - but rather

Re: [compress] [Poll] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Gilles Sadowski
Le jeu. 1 juil. 2021 à 11:31, Torsten Curdt a écrit : > > > I'm not sure what you refer to exactly, > > > The various links from > > https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html > > or even > > https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html > > > >

Re: [compress] [Poll] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Torsten Curdt
> I'm not sure what you refer to exactly, The various links from https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html or even https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html > but I noted already that not all > references are equal, especially if you

Re: [compress] [Poll] Dealing with uncaught RuntimeExceptions

2021-07-01 Thread Gilles Sadowski
Le jeu. 1 juil. 2021 à 02:27, Torsten Curdt a écrit : > > > > > "If there is runtime exception there is a bug in the code" > > > > I don't think that's correct because IllegalArgumentException is a > > RuntimeException. > > > I have a hard time following that causality. The way I've seen this >