Description
This issue implements two TODOs in `LocalScratchSpace.java` by implementing exception handling logic.
- // TODO: Error handling... - ret += f.length(); + try { + ret += f.length(); + } catch (final SecurityException e) { + LOG.info("Fail to get file info:" + f.getAbsolutePath()); + }
- // TODO: Error handling. Files.delete() would give us an exception. We - // should pass a set of Exceptions into a ReefRuntimeException. for (final File f : tempFiles) { - f.delete(); + try { + if (!f.delete()) { + throw new RuntimeException("Fail to delete file:" + f.getAbsolutePath()); + } + } catch (final SecurityException e) { + throw new RuntimeException("Fail to delete file:" + f.getAbsolutePath(), e); + }
Attachments
Issue Links
- is related to
-
REEF-525 Add missing Javadoc comments/triage TODO notes in Java code: reef-io
- Open
- links to