Skip to content
Snippets Groups Projects
Commit 8a2853dc authored by brinn's avatar brinn
Browse files

improve: handling of the case where handler.handle() throws an Error

SVN: 877
parent 43f7e15c
No related branches found
No related tags found
No related merge requests found
......@@ -225,19 +225,17 @@ public final class DirectoryScanningTimerTask extends TimerTask implements ISelf
try
{
final boolean handledOK = handler.handle(path);
if (handledOK && path.exists())
{
operationLog.warn(String.format("Handler %s reports path '%s' be handled OK, but path still exists.",
handler.getClass().getSimpleName(), path));
}
} finally
{
if (path.exists())
{
if (handledOK)
{
operationLog.warn(String.format("Handler %s reports path '%s' be handled OK, but path still exists.",
handler.getClass().getSimpleName(), path));
}
addToFaultyPaths(path);
}
} catch (RuntimeException ex)
{
addToFaultyPaths(path);
throw ex;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment