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