Skip to content

Commit 54253ee

Browse files
author
Federico Fissore
committed
Improved error message when unable to connect to the board via SSH
1 parent 027f7c7 commit 54253ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/cc/arduino/packages/uploaders/SSHUploader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.jcraft.jsch.JSchException;
3737
import com.jcraft.jsch.Session;
3838
import processing.app.Base;
39+
import processing.app.I18n;
3940
import processing.app.Preferences;
4041
import processing.app.debug.RunnerException;
4142
import processing.app.debug.TargetPlatform;
@@ -95,6 +96,9 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
9596
if ("Auth cancel".equals(message) || "Auth fail".equals(message)) {
9697
return false;
9798
}
99+
if (e.getMessage().contains("Connection refused")) {
100+
throw new RunnerException(I18n.format("Unable to connect to {0}", port.getAddress()));
101+
}
98102
throw new RunnerException(e);
99103
} catch (Exception e) {
100104
throw new RunnerException(e);

0 commit comments

Comments
 (0)