Skip to content

Commit

Permalink
add log to debug windows extracting process
Browse files Browse the repository at this point in the history
  • Loading branch information
reyman committed Sep 19, 2024
1 parent cbc31da commit 74f80c1
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/main/scala/eighties/h24/tools/ExtractRelevantData.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,24 @@ import com.github.tototoshi.csv.defaultCSVFormat
writer.close()
dataStore.dispose()
}
} finally reader.close()
} finally store.dispose()
} catch {
case e: IOException => println("Had an IOException trying reading this file")
case e: FileNotFoundException => println("File Not Found")
case e: NoSuchElementException => println("No such element")
case e: IllegalArgumentException => println("Bad Argument")
case _: Throwable => println("Other Exception")
}
finally {
try {
reader.close()
}catch {
case e:IOException => println("Had an IOException trying closing this reader")
}
}
} catch {
case e: IOException => println("Had an IOException trying reading getting feature reader")
}
finally store.dispose()
}

def getStringCellValue(cell: Cell) = {for (cel <- Option(cell)) yield {if (cel.getCellType == CellType.NUMERIC) cel.getNumericCellValue.toString else cel.getStringCellValue}} getOrElse ""
Expand Down

0 comments on commit 74f80c1

Please sign in to comment.