Log errors if things don't go as expected
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1462 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
24565cf5de
commit
c42c78dc0a
@ -46,7 +46,10 @@ public class FileProjectManager extends ProjectManager {
|
||||
protected FileProjectManager(File dir) {
|
||||
super();
|
||||
_workspaceDir = dir;
|
||||
_workspaceDir.mkdirs();
|
||||
if (!_workspaceDir.mkdirs()) {
|
||||
logger.error("Failed to create directory : " + _workspaceDir);
|
||||
return;
|
||||
}
|
||||
|
||||
load();
|
||||
recover();
|
||||
@ -280,6 +283,7 @@ public class FileProjectManager extends ProjectManager {
|
||||
if (loadFromFile(new File(_workspaceDir, "workspace.json"))) return;
|
||||
if (loadFromFile(new File(_workspaceDir, "workspace.temp.json"))) return;
|
||||
if (loadFromFile(new File(_workspaceDir, "workspace.old.json"))) return;
|
||||
logger.error("Failed to load workspace from any attempted alternatives.");
|
||||
}
|
||||
|
||||
protected boolean loadFromFile(File file) {
|
||||
|
Loading…
Reference in New Issue
Block a user