From e26306c9350ef1d107d4257ef1c09d15165c9154 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Dec 2013 01:14:11 -0800 Subject: altoslib: Pass InterruptedException up the stack instead of hiding it When interrupting a thread that is talking to a serial device, it's important not to have that thread discard the InterruptedException so that it will actually terminate. This patch removes a bunch of places that were discarding InterruptedExceptions and lets higher level code see them so that they can exit cleanly. Signed-off-by: Keith Packard --- altoslib/AltosFlightReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'altoslib/AltosFlightReader.java') diff --git a/altoslib/AltosFlightReader.java b/altoslib/AltosFlightReader.java index 4a722e42..b251e7cc 100644 --- a/altoslib/AltosFlightReader.java +++ b/altoslib/AltosFlightReader.java @@ -46,7 +46,7 @@ public class AltosFlightReader { public File backing_file() { return null; } - public boolean has_monitor_battery() { return false; } + public boolean has_monitor_battery() throws InterruptedException { return false; } - public double monitor_battery() { return AltosLib.MISSING; } + public double monitor_battery() throws InterruptedException { return AltosLib.MISSING; } } -- cgit v1.2.3