1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Catch the IOException launched by close() method of LineIterator
Author: Pierre Gruet <pgt@debian.org>
Forwarded: https://github.com/CampagneLaboratory/goby3/issues/7
Last-Update: 2020-11-03
--- a/goby-distribution/src/main/java/org/campagnelab/goby/modes/EmpiricalPMode.java
+++ b/goby-distribution/src/main/java/org/campagnelab/goby/modes/EmpiricalPMode.java
@@ -342,7 +342,12 @@
Object next = it.next();
lineCount++;
}
- it.close();
+ try {
+ it.close();
+ } catch (IOException e) {
+ System.err.println("Could not close LineIterator on " + inputFilename);
+ System.exit(1);
+ }
return lineCount;
}
|