Log exception when SSH session creation fails machristie/issue33 34/head
authorMarcus Christie <machristie@apache.org>
Mon, 5 Apr 2021 18:16:00 +0000 (14:16 -0400)
committerMarcus Christie <machristie@apache.org>
Mon, 5 Apr 2021 18:16:00 +0000 (14:16 -0400)
transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPTransportUtil.java

index 7cf159d9ea119df82f6ac8573351e198bb2bce3f..c0228bb2a6a3558238493ee3cac0c61834fe21d8 100755 (executable)
@@ -45,7 +45,9 @@ public class SCPTransportUtil {
 
             return session;
         } catch (JSchException e) {
-            throw new Exception("Failed to create a ssh session for " + user + "@" + host + ":" + port, e);
+            String message = "Failed to create a ssh session for " + user + "@" + host + ":" + port;
+            logger.error(message, e);
+            throw new Exception(message, e);
         }
     }
 }