Skip to content

Commit 4a8dfbe

Browse files
author
Vladimir Kotal
committed
better exception handling and messaging in getFileContent()
1 parent d435b82 commit 4a8dfbe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/org/opensolaris/opengrok/configuration/Configuration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,11 @@ private static String getFileContent(File file) {
10361036
}
10371037
return contents.toString();
10381038
} catch (java.io.FileNotFoundException e) {
1039-
/*
1040-
* should usually not happen
1041-
*/
1039+
LOGGER.log(Level.WARNING, "failed to find file: {0}",
1040+
e.getMessage());
10421041
} catch (java.io.IOException e) {
1043-
LOGGER.log(Level.WARNING, "failed to read header include file: {0}", e.getMessage());
1042+
LOGGER.log(Level.WARNING, "failed to read file: {0}",
1043+
e.getMessage());
10441044
} finally {
10451045
if (input != null) {
10461046
try {

0 commit comments

Comments
 (0)