Skip to content

Commit b5bfe08

Browse files
committed
Better error for 'no serial ports available'
See #8194 (comment)
1 parent 2647ce3 commit b5bfe08

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: app/src/processing/app/Editor.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -2036,9 +2036,15 @@ public void run() {
20362036
statusNotice(tr("Done uploading."));
20372037
}
20382038
} catch (SerialNotFoundException e) {
2039-
if (portMenu.getItemCount() == 0) statusError(e);
2040-
else if (serialPrompt()) run();
2041-
else statusNotice(tr("Upload canceled."));
2039+
if (portMenu.getItemCount() == 0) {
2040+
statusError(tr("Serial port not selected."));
2041+
} else {
2042+
if (serialPrompt()) {
2043+
run();
2044+
} else {
2045+
statusNotice(tr("Upload canceled."));
2046+
}
2047+
}
20422048
} catch (PreferencesMapException e) {
20432049
statusError(I18n.format(
20442050
tr("Error while uploading: missing '{0}' configuration parameter"),

0 commit comments

Comments
 (0)