Hi! > Niklas Gustavsson [mailto:[EMAIL PROTECTED] wrote > > Yes, I'm aware that we can chain and replace exceptions thrown by the > various protocols, that was not my concern. My question was if > IOExceptions semantics matches the error conditions that we talk about > here. From the Javadoc: "Signals that an I/O exception of some sort > has occurred". I'm not sure if this is true for many of the cases > where the FtpServer file system abstraction fails. But then again, > this might be a case of splitting hairs. What do the rest of you > think?
Using IOException for anything not IO related isn't a good practice. If there's really an IOException the implementation must cleanup the IO resources! Misusing IOException will lead to confusion and zombie connections/IO resources. I had similar discussions about the need of own exceptions, always with the same background: laziness and fear of complexity. The argumentation always reminds me on the Exceptions part of the mindprod "unmain"-Site: "Subclassing exceptions is for incompetents who know their code will fail. You can greatly simplify your program by having only a single try/catch in the entire application (in main) that calls System.exit()." regards Steve
