summaryrefslogtreecommitdiff
path: root/altoslib/AltosFlash.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-18 01:14:11 -0800
committerKeith Packard <keithp@keithp.com>2013-12-18 01:14:11 -0800
commite26306c9350ef1d107d4257ef1c09d15165c9154 (patch)
treed7983c6a04c54b3307d6fc2699dad4fa21d8bde0 /altoslib/AltosFlash.java
parent18852efa108ba6e6e69dfd5076d4f4c01f62b4ef (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosFlash.java')
-rw-r--r--altoslib/AltosFlash.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/altoslib/AltosFlash.java b/altoslib/AltosFlash.java
index 0906f2ef..0977070e 100644
--- a/altoslib/AltosFlash.java
+++ b/altoslib/AltosFlash.java
@@ -318,7 +318,7 @@ public class AltosFlash extends AltosProgrammer {
close();
}
- public boolean check_rom_config() {
+ public boolean check_rom_config() throws InterruptedException {
if (debug == null)
return true;
if (rom_config == null)
@@ -330,7 +330,7 @@ public class AltosFlash extends AltosProgrammer {
rom_config = romconfig;
}
- public AltosRomconfig romconfig() {
+ public AltosRomconfig romconfig() throws InterruptedException {
if (!check_rom_config())
return null;
return rom_config;