Skip to content

Commit 72225ba

Browse files
committed
wording corrected
1 parent 4b10bfa commit 72225ba

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/main/kotlin/com/vk/admstorm/ssh/SshConnectionService.kt

+8-10
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,9 @@ class SshConnectionService(private var myProject: Project) : Disposable {
199199
return
200200
}
201201

202-
val message =
203-
"${ex.javaClass.name}: ${ex.message}"
204-
if (ex.message!!.contains("HostKeyAlgorithms")) {
205-
AdmErrorNotification(message, true)
206-
.withTitle("Did you switch your SSH config type to LEGACY?")
202+
if (ex.message?.contains("HostKeyAlgorithms") == true) {
203+
AdmErrorNotification("Recheck your config or the documentation", true)
204+
.withTitle("Did you add HostKeyAlgorithms to your config?")
207205
.withActions(AdmNotification.Action("Reconnect...") { _, notification ->
208206
notification.expire()
209207
connectWithConnector(connector, onSuccessful)
@@ -212,17 +210,17 @@ class SshConnectionService(private var myProject: Project) : Disposable {
212210
return
213211
}
214212

215-
AdmErrorNotification(message, true)
216-
.withTitle("Did you connect to corporate access system?")
213+
AdmErrorNotification("Check the documentation about connection to network", true)
214+
.withTitle("Did you miss your connection?")
217215
.withActions(AdmNotification.Action("Reconnect...") { _, notification ->
218216
notification.expire()
219217
connectWithConnector(connector, onSuccessful)
220218
}).show()
221219
LOG.info("Corporate access error", ex)
222220
} catch (ex: Exception) {
223-
val message = ex.javaClass.name
224-
LOG.error("Unhandled exception $message: ${ex.message}")
225-
AdmErrorNotification("Unhandled exception $message").show()
221+
val exceptionName = ex.javaClass.name
222+
LOG.error("Unhandled exception", ex)
223+
AdmErrorNotification("Unhandled exception $exceptionName").show()
226224
return
227225
}
228226
}

0 commit comments

Comments
 (0)