If you look at the source of DOMConfigurator.doConfigure , it looks like it catches Exception, and then just logs the error and not solves it, so FileNotFoundExceptionit won’t return to your calling code.
try {
...
} catch (Exception e) {
if (e instanceof InterruptedException || e instanceof InterruptedIOException) {
Thread.currentThread().interrupt();
}
// I know this is miserable...
LogLog.error("Could not parse "+ action.toString() + ".", e);
}
To get around this, you can pre-check if the file exists.
mikej source
share