Skip to content
Snippets Groups Projects
Commit ebdb7b7b authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- refactor: re-enabled catches for error logging but rethrow exceptions, added...

- refactor: re-enabled catches for error logging but rethrow exceptions, added proper io exception catch for dead reference check
parent 9c7dfe7a
No related branches found
No related tags found
No related merge requests found
...@@ -117,15 +117,18 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { ...@@ -117,15 +117,18 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
} }
} }
} }
// catch (IOException e) { catch (IOException e) {
// log.error("SLUBStoragePlugin.checkFixity(), I/O error, " + e.getMessage()); log.error("SLUBStoragePlugin.checkFixity(), I/O error, " + e.getMessage());
// } throw e;
// catch (NoSuchAlgorithmException e) { }
// log.error( "SLUBStoragePlugin.checkFixity(), missed Algorithm, " + e.getMessage()); catch (NoSuchAlgorithmException e) {
// } log.error( "SLUBStoragePlugin.checkFixity(), missed Algorithm, " + e.getMessage());
// catch (Exception e) { throw e;
// log.error( "SLUBStoragePlugin.checkFixity(), unknown problem, " + e.getMessage()); }
// } catch (Exception e) {
log.error( "SLUBStoragePlugin.checkFixity(), unknown problem, " + e.getMessage());
throw e;
}
finally finally
{ {
log.info("SLUBStoragePlugin.checkFixity() finally called"); log.info("SLUBStoragePlugin.checkFixity() finally called");
...@@ -246,12 +249,18 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { ...@@ -246,12 +249,18 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
file.seek(start); file.seek(start);
file.readFully(bytes, 0, (int)(end - start + 1L)); file.readFully(bytes, 0, (int)(end - start + 1L));
} }
// catch (FileNotFoundException e) { catch (FileNotFoundException e) {
// log.error("SLUBStoragePlugin.retrieveEntitybyRange(), file not found, " + e.getMessage()); log.error("SLUBStoragePlugin.retrieveEntitybyRange(), file not found, " + e.getMessage());
// } throw e;
// catch (Exception e) { }
// log.error("SLUBStoragePlugin.retrieveEntityByRange(), I/O error, " + e.getMessage()); catch (IOException e) {
// } log.error("SLUBStoragePlugin.retrieveEntityByRange(), I/O error, " + e.getMessage());
throw e;
}
catch (Exception e) {
log.error("SLUBStoragePlugin.retrieveEntityByRange(), unknown problem, " + e.getMessage());
throw e;
}
finally finally
{ {
log.info("SLUBStoragePlugin.retrieveEntityByRange() finally called"); log.info("SLUBStoragePlugin.retrieveEntityByRange() finally called");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment