mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 04:59:51 +08:00
fix: 解决sftp服务器连接失败未抛出异常,导致后续获取ChannelSft出现nullPointerException
This commit is contained in:
parent
f6d21f112d
commit
1ff453b9cb
@ -64,6 +64,8 @@ public class SftpHelper extends FtpHelper {
|
|||||||
String message = String.format("请确认连接ftp服务器端口是否正确,错误的端口: [%s] ", port);
|
String message = String.format("请确认连接ftp服务器端口是否正确,错误的端口: [%s] ", port);
|
||||||
LOG.error(message);
|
LOG.error(message);
|
||||||
throw DataXException.asDataXException(FtpReaderErrorCode.FAIL_LOGIN, message, e);
|
throw DataXException.asDataXException(FtpReaderErrorCode.FAIL_LOGIN, message, e);
|
||||||
|
}else{
|
||||||
|
throw DataXException.asDataXException(FtpReaderErrorCode.COMMAND_FTP_IO_EXCEPTION, "", e);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if("Auth fail".equals(e.getMessage())){
|
if("Auth fail".equals(e.getMessage())){
|
||||||
|
Loading…
Reference in New Issue
Block a user