X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosSerial.java;h=b016c1d65fbecfe0463c0e97933148cf10c2d55b;hb=e76b9cc32bbcc5176d9bdd6f8d79778024627382;hp=e84f5b63e4e21c7ca5cdd0cbb0cb90c863383ced;hpb=8f2f38f2a9fb0c106e2c6b60cdc205292ce329ea;p=fw%2Faltos diff --git a/ao-tools/altosui/AltosSerial.java b/ao-tools/altosui/AltosSerial.java index e84f5b63..b016c1d6 100644 --- a/ao-tools/altosui/AltosSerial.java +++ b/ao-tools/altosui/AltosSerial.java @@ -134,6 +134,8 @@ public class AltosSerial implements Runnable { public void open(altos_device device) throws FileNotFoundException { close(); altos = libaltos.altos_open(device); + if (altos == null) + throw new FileNotFoundException(device.getPath()); input_thread = new Thread(this); input_thread.start(); }