From: Keith Packard Date: Sat, 8 Feb 2014 06:45:26 +0000 (-0800) Subject: micropeak: Missing a couple of new exceptions when loading files X-Git-Tag: 1.3.2~19 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=28d5239bff234cc1158a270a29c0e39067f613c3 micropeak: Missing a couple of new exceptions when loading files The change to keep reading on invalid chars from the serial port exposed a couple of new exceptions from the MicroData code which the file loading code needs to cope with. Signed-off-by: Keith Packard --- diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java index 2a8e2ca6..78bc857e 100644 --- a/micropeak/MicroPeak.java +++ b/micropeak/MicroPeak.java @@ -65,6 +65,10 @@ public class MicroPeak extends MicroFrame implements ActionListener, ItemListene try { data = new MicroData((InputStream) fis, filename.getName()); AltosUIPreferences.set_last_logdir(filename); + } catch (MicroData.NonHexcharException nhe) { + data = null; + } catch (MicroData.FileEndedException nhe) { + data = null; } catch (InterruptedException ie) { data = null; } finally {