Commit d756133d authored by tordinge's avatar tordinge
Browse files

display warning if lock file cannot be deleted, and why

parent 3a1174ea
......@@ -25,6 +25,8 @@ import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
......@@ -397,7 +399,11 @@ public class ExoneraTorDatabaseImporter {
/* Delete the exonerator-lock file to allow the next executing of this
* tool. */
private static void deleteLockFile() {
new File("exonerator-lock").delete();
try {
Files.delete(Paths.get("exonerator-lock"));
} catch (IOException e) {
logger.warn("Could not delete lock file \"exonerator-lock\"", e);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment