mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Improved error message when unable to connect to the board via SSH
This commit is contained in:
@ -36,6 +36,7 @@ import com.jcraft.jsch.JSch;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import com.jcraft.jsch.Session;
|
||||
import processing.app.Base;
|
||||
import processing.app.I18n;
|
||||
import processing.app.Preferences;
|
||||
import processing.app.debug.RunnerException;
|
||||
import processing.app.debug.TargetPlatform;
|
||||
@ -95,6 +96,9 @@ public class SSHUploader extends Uploader {
|
||||
if ("Auth cancel".equals(message) || "Auth fail".equals(message)) {
|
||||
return false;
|
||||
}
|
||||
if (e.getMessage().contains("Connection refused")) {
|
||||
throw new RunnerException(I18n.format("Unable to connect to {0}", port.getAddress()));
|
||||
}
|
||||
throw new RunnerException(e);
|
||||
} catch (Exception e) {
|
||||
throw new RunnerException(e);
|
||||
|
Reference in New Issue
Block a user