I need to populate a list of possible error’s that could be encountered with sftp and ftp. After which I just need to match the error that comes with this list and do various actions.
In a properties file I have
SFTP_ERRORS= <list of comman separated token>
and later in java I just a do simple iteration over this as
StringTokenizer tok = new StringTokenizer(getProperty(SFTP_ERRORS),",");
while (tok.hasMoreTokens()) {
/// various action for specific errors
}
I am not able to find a complete list of error messages that sftp and ftp would give.
Also, some are logged on stdout and some on stderr, which is another thing to know.
Can anyone help me with this?
For SFTP, Page 20 might be helpful. JSCH returns id and the message in the form of SftpException.