Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e385f67

Browse files
author
Federico Fissore
committed
Better error message when opening serial monitor on a busy serial device. Closes #2632
1 parent 7211eb0 commit e385f67

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎app/src/processing/app/Editor.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import com.jcraft.jsch.JSchException;
2828

29+
import jssc.SerialPortException;
2930
import processing.app.debug.*;
3031
import processing.app.forms.PasswordAuthorizationDialog;
3132
import processing.app.helpers.OSUtils;
@@ -2572,6 +2573,12 @@ public void handleSerial() {
25722573
statusError(_("Unable to connect: is the sketch using the bridge?"));
25732574
} catch (JSchException e) {
25742575
statusError(_("Unable to connect: wrong password?"));
2576+
} catch (SerialException e) {
2577+
String errorMessage = e.getMessage();
2578+
if (e.getCause() != null && e.getCause() instanceof SerialPortException) {
2579+
errorMessage += " (" + ((SerialPortException) e.getCause()).getExceptionType() + ")";
2580+
}
2581+
statusError(errorMessage);
25752582
} catch (Exception e) {
25762583
statusError(e);
25772584
} finally {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /