From df2a47bb6a009b99e5876272cddb5851779a1ccc Mon Sep 17 00:00:00 2001 From: az Date: Sun, 26 Feb 2023 19:49:45 +0100 Subject: [PATCH] [skip ci] improve error message when failing ssh connection --- .../provs/framework/core/processors/RemoteUbuntuProcessor.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt index aebd0e7..ead6482 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt @@ -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) } } }