Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-06-20 23:58:24 -0400
committermkersten2005-06-20 23:58:24 -0400
commite4fffd9c11e501d7ac2a7cee36466f959586b9ce (patch)
tree9a57416aa9461ab576fdf75b9ae4463b3f4bfba3
parentee73e9177ff88bf9de19f7d3ea4e17c720e34f3d (diff)
downloadorg.eclipse.mylyn.tasks-e4fffd9c11e501d7ac2a7cee36466f959586b9ce.tar.gz
org.eclipse.mylyn.tasks-e4fffd9c11e501d7ac2a7cee36466f959586b9ce.tar.xz
org.eclipse.mylyn.tasks-e4fffd9c11e501d7ac2a7cee36466f959586b9ce.zip
Improved error handling policy
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/BugzillaTask.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/Task.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/BugzillaTaskEditor.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskSummaryEditor.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java10
8 files changed, 18 insertions, 18 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/BugzillaTask.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/BugzillaTask.java
index 9ffe0bd39..f3af722dd 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/BugzillaTask.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/BugzillaTask.java
@@ -178,9 +178,9 @@ public class BugzillaTask extends Task {
// XXX make sure to send in the server name if there are multiple repositories
return BugzillaRepository.getInstance().getBug(getBugId(getHandle()));
} catch (LoginException e) {
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "download failed");
} catch (IOException e) {
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "download failed");
}
return null;
}
@@ -263,7 +263,7 @@ public class BugzillaTask extends Task {
page.openEditor(input, "org.eclipse.mylar.tasks.ui.bugzillaTaskEditor");
}
catch (PartInitException ex) {
- MylarPlugin.log(this.getClass().toString(), ex);
+ MylarPlugin.log(ex, "couldn't open");
return;
}
}
@@ -349,7 +349,7 @@ public class BugzillaTask extends Task {
notifyTaskDataChange();
return new Status(IStatus.OK, MylarPlugin.IDENTIFIER, IStatus.OK, "", null);
}catch(Exception e){
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "couldn't open");
}
return Status.CANCEL_STATUS;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/Task.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/Task.java
index 440344269..3948f1331 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/Task.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/Task.java
@@ -169,7 +169,7 @@ public class Task implements ITask {
}
catch (PartInitException ex)
{
- MylarPlugin.log(this.getClass().toString(), ex);
+ MylarPlugin.log(ex, "open failed");
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
index ff6763c14..1cc2278c6 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
@@ -61,7 +61,7 @@ public class TaskListManager {
}
return true;
} catch (Exception e) {
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "task read failed");
return false;
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java
index 08352a2af..eb2661326 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java
@@ -218,7 +218,7 @@ public class BugzillaMylarSearchOperation extends WorkspaceModifyOperation
try{
searchCollector.accept(hit);
}catch(CoreException e){
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "bug search failed");
}
}
}
@@ -284,10 +284,10 @@ public class BugzillaMylarSearchOperation extends WorkspaceModifyOperation
// check the status so that we don't keep searching if there
// is a problem
if (status.getCode() == IStatus.CANCEL) {
- MylarPlugin.log(this, "SEARCH CANCELLED");
+ MylarPlugin.log("search cancelled", this);
return null;
} else if (!status.isOK()) {
- MylarPlugin.log(this, "SEARCH ERROR");
+ MylarPlugin.log("search error", this);
MylarPlugin.log(status);
return null;
}
@@ -448,7 +448,7 @@ public class BugzillaMylarSearchOperation extends WorkspaceModifyOperation
// }
} catch (Exception e) {
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "search failed");
}
finally{
doiList.add(info);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/BugzillaTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/BugzillaTaskEditor.java
index fc16aec88..d3a54dc3f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/BugzillaTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/BugzillaTaskEditor.java
@@ -115,7 +115,7 @@ public class BugzillaTaskEditor extends MultiPageEditorPart {
int index = addPage(taskSummaryEditor, new TaskEditorInput(bugTask));
setPageText(index, "Summary");
}catch(Exception e){
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "summary failed");
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskSummaryEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskSummaryEditor.java
index c7a7e7e95..5648dc049 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskSummaryEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskSummaryEditor.java
@@ -277,7 +277,7 @@ public class TaskSummaryEditor extends EditorPart {
createPlanningGameSection(parent, toolkit);
createRelatedLinksSection(parent, toolkit);
} catch (SWTException e) {
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, "content failed");
}
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
index 14d825a15..7dc995324 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
@@ -733,7 +733,7 @@ public class TaskListView extends ViewPart {
try{
closeBugTaskEditors((ITask)selectedObject, page);
}catch(Exception e){
- MylarPlugin.log(this.getClass().toString(), e);
+ MylarPlugin.log(e, " deletion failed");
}
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java
index 93e8d2c2a..f0aa3ff82 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java
@@ -98,7 +98,7 @@ public class XmlUtil {
outputStream.flush();
outputStream.close();
} catch (Exception fnfe) {
- MylarPlugin.log("Tasklist could not be found");
+ MylarPlugin.log(fnfe, "Tasklist could not be found");
}
}
@@ -229,7 +229,7 @@ public class XmlUtil {
String name = inFile.getAbsolutePath();
name = name.substring(0, name.lastIndexOf('.')) + "-save.xml";
inFile.renameTo(new File(name));
- MylarPlugin.log("XmlUtil", e);
+ MylarPlugin.log(e, "XmlUtil");
}
}
@@ -258,7 +258,7 @@ public class XmlUtil {
builder = factory.newDocumentBuilder();
} catch (ParserConfigurationException pce) {
inputFile.renameTo(new File(inputFile.getName() + "save.xml"));
- MylarPlugin.log("Failed to load XML file", pce);
+ MylarPlugin.log(pce, "Failed to load XML file");
}
try {
// Parse the content of the given file as an XML document
@@ -266,7 +266,7 @@ public class XmlUtil {
document = builder.parse(inputFile);
} catch (SAXException se) {
inputFile.renameTo(new File(inputFile.getName() + "save.xml"));
- MylarPlugin.log("Failed to parse XML file", se);
+ MylarPlugin.log(se, "Failed to parse XML file");
}
return document;
}
@@ -298,7 +298,7 @@ public class XmlUtil {
bt.setDirty(false);
}
if (bt.readBugReport() == false) {
- MylarPlugin.log("Failed to read bug report");
+ MylarPlugin.log("Failed to read bug report", null);
}
} else {
t = new Task(handle, label);

Back to the top