File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2626
2727import com .jcraft .jsch .JSchException ;
2828
29+ import jssc .SerialPortException ;
2930import processing .app .debug .*;
3031import processing .app .forms .PasswordAuthorizationDialog ;
3132import 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 {
You can’t perform that action at this time.
0 commit comments