Skip to content

Commit

Permalink
common: include filename in error message
Browse files Browse the repository at this point in the history
Motivation:

If there is an IOException when reading the setup file, the corresponding
filename is not included in the message.  This may make diagnosing the
problem harder for the admin.

Modification:

Wrap the IOException to include the filename.

Result:

More useful error messages

Target: master
Requires-notes: yes
Requires-book: no
Request: 2.16
Request: 2.15
Request: 2.14
Request: 2.13
Patch: https://rb.dcache.org/r/9587/
Acked-by: Gerd Behrmann

Conflicts:
	modules/dcache/src/main/java/org/dcache/cells/UniversalSpringCell.java
  • Loading branch information
paulmillar committed Aug 5, 2016
1 parent f9005e9 commit c73bfee
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -449,6 +449,9 @@ private void execFile(File setup)
lineCount + ": " + e.getMessage());
}
}
} catch (IOException e) {
throw new IOException("Failed to read " + setup + ": " +
e.getMessage(), e);
} finally {
try {
br.close();
Expand Down

0 comments on commit c73bfee

Please sign in to comment.