X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosSerial.java;h=4cf306d051e478706294010c90c35c6ce7aae104;hp=0a531aa96faa8b2b0b27fc0f412b78c920648231;hb=31e3255b6cbfaf95c0e97e2d1ec8de72f845994c;hpb=746d6a472a20243a8c0eacc8edf8e81e0641bc17 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());