Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2008-09-09 17:21:08 -0400
committerrelves2008-09-09 17:21:08 -0400
commit7703f5f40c56f60f5ab7bf5dc7cc251ee966a12d (patch)
tree89cb5ce3dd7a4b54d194f0347f51e4a8f6c08234
parent3983cf2e7cb769619d03de973bf537cc53e6e554 (diff)
downloadorg.eclipse.mylyn.tasks-7703f5f40c56f60f5ab7bf5dc7cc251ee966a12d.tar.gz
org.eclipse.mylyn.tasks-7703f5f40c56f60f5ab7bf5dc7cc251ee966a12d.tar.xz
org.eclipse.mylyn.tasks-7703f5f40c56f60f5ab7bf5dc7cc251ee966a12d.zip
NEW - bug 237714: notify user about externalization errors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=237714
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java
index 21da390a2..faf8ce9e7 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java
@@ -13,8 +13,12 @@ import java.io.File;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.Policy;
+import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
/**
* File based externalization participant
@@ -77,6 +81,8 @@ public abstract class AbstractExternalizationParticipant implements IExternaliza
return true;
} catch (CoreException e) {
if (dataFile != null) {
+ StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, "Failed to load "
+ + dataFile.getName() + ", restoring from snapshot"));
File backup = new File(dataFile.getParentFile(), SNAPSHOT_PREFIX + dataFile.getName());
if (backup.exists()) {
load(backup, monitor);

Back to the top