L created VFS-580:
---------------------
Summary: Improve FTP error messages
Key: VFS-580
URL: https://issues.apache.org/jira/browse/VFS-580
Project: Commons VFS
Issue Type: Improvement
Affects Versions: Nightly Builds, 2.1
Reporter: L
FTP provider classes throw FileSystemException is some operations cannot be
performed. It would be really nice if the exceptions also included
ftpClient.getReplyString() in the message.
Reason: normally an error is reported to a user by using getMessage() on the
exception instance. The errors reported by FTP provider look now too generic
and cannot help diagnose the issue.
For example, FtpFileObject.doCreateFolder() has this code:
if (!ok)
{
throw new
FileSystemException("vfs.provider.ftp/create-folder.error", getName());
}
The reported error looks like:
Could not create FTP directory dir_name.
Why the operation failed? Only the stack trace can help.
There are of course more places where adding ftpClient.getReplyString() makes
sense.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)