From 28d5239bff234cc1158a270a29c0e39067f613c3 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 7 Feb 2014 22:45:26 -0800 Subject: [PATCH] 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 --- micropeak/MicroPeak.java | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- 2.30.2