X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosSerial.java;h=4cf306d051e478706294010c90c35c6ce7aae104;hp=0a531aa96faa8b2b0b27fc0f412b78c920648231;hb=31e3255b6cbfaf95c0e97e2d1ec8de72f845994c;hpb=cf72c2f5a69a736c28a9b63e124d510ef41a9f5d;ds=sidebyside diff --git a/altosui/AltosSerial.java b/altosui/AltosSerial.java index 0a531aa9..4cf306d0 100644 --- a/altosui/AltosSerial.java +++ b/altosui/AltosSerial.java @@ -323,8 +323,10 @@ public class AltosSerial implements Runnable { } altos = device.open(); if (altos == null) { + final String message = device.getErrorString(); close(); - throw new FileNotFoundException(device.toShortString()); + throw new FileNotFoundException(String.format("%s (%s)", + device.toShortString(), message)); } if (debug) System.out.printf("Open %s\n", device.getPath());