[skip ci] improve error message when failing ssh connection
This commit is contained in:
parent
a06d47ff30
commit
df2a47bb6a
1 changed files with 3 additions and 2 deletions
|
@ -52,8 +52,9 @@ class RemoteProcessor(host: InetAddress, user: String, password: Secret? = null)
|
|||
try {
|
||||
ssh.disconnect()
|
||||
} finally {
|
||||
log.error("Got exception when initializing ssh (Username, password or ssh-key might be wrong): " + e.message)
|
||||
throw RuntimeException("Error when initializing ssh (Username, password or ssh-key might be wrong) ", e)
|
||||
val errorMag = "Error when initializing ssh (Host, username, password or ssh-key might be wrong) "
|
||||
log.error(errorMag + e.message)
|
||||
throw RuntimeException(errorMag, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue