On Wed, Oct 1, 2008 at 11:29 PM, Andrea Francia <[EMAIL PROTECTED]> wrote:
> Here the FileSystemView interface declaration:
>
> public interface FileSystemView {
> FileObject getHomeDirectory() throws FtpException;
> FileObject getCurrentDirectory() throws FtpException;
> boolean changeDirectory(String dir) throws FtpException;
> FileObject getFileObject(String file) throws FtpException;
> boolean isRandomAccessible() throws FtpException;
> void dispose();
> }
>
> Why we use a generic FtpException while, I think, an IOException will
> describe more precisely the type of the problem that can happen?
Our exception strategy would definitely benefit from some love. In
this specific case, I'm not sure what's the best thing to do. Remember
that a file system can be backed by all sorts of technology, for
example, JDBC seems like a common choice. Is IOException a good fit if
something goes wrong within JDBC (which itself would throw a
SQLExeption) or JMS (which throws a JMSException)?
/niklas