@@ -199,11 +199,9 @@ class SshConnectionService(private var myProject: Project) : Disposable {
199
199
return
200
200
}
201
201
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?" )
207
205
.withActions(AdmNotification .Action (" Reconnect..." ) { _, notification ->
208
206
notification.expire()
209
207
connectWithConnector(connector, onSuccessful)
@@ -212,17 +210,17 @@ class SshConnectionService(private var myProject: Project) : Disposable {
212
210
return
213
211
}
214
212
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 ?" )
217
215
.withActions(AdmNotification .Action (" Reconnect..." ) { _, notification ->
218
216
notification.expire()
219
217
connectWithConnector(connector, onSuccessful)
220
218
}).show()
221
219
LOG .info(" Corporate access error" , ex)
222
220
} 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()
226
224
return
227
225
}
228
226
}
0 commit comments