Skip to content

Commit

Permalink
Log exception when SSH session creation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
machristie authored and DImuthuUpe committed Apr 21, 2021
1 parent 0fcc130 commit 62d4957
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -45,7 +45,9 @@ public static Session createSession(String user, String host, int port, byte[] p

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);
}
}
}

0 comments on commit 62d4957

Please sign in to comment.