mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Francia" <and...@andreafrancia.it>
Subject Re: Exceptions of the FileSystemView
Date Thu, 02 Oct 2008 12:49:18 GMT
2008/10/2 Emmanuel Lecharny <elecharny@gmail.com>:
> Andrea Francia wrote:
>> 2008/10/2 Steve Ulrich <steve.ulrich@proemion.com>:
>>> 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()."
>> The use of a single FtpException goes in this direction.
> IMHO, FtpException must be the root of other exceptions, like
> FtpNoSuchFileException, and such. As Niklas mentioned, it deserves some
> love.

IMHO The FileSystemView should be agnostic more as possible about the FtpServer.
The FileSystemView represents a FileSystem and should be also possible
so one can reuse it with something different like a, perhaps
NTFSServer, or SambaServer, or WebDavServer..

I don't think that FtpNoSuchFileException should be a descendant of

Andrea Francia

View raw message