summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-04-04 18:12:02 (EDT)
committer Steffen Pingel2013-04-04 18:12:02 (EDT)
commit0f8920518761b7ba9f1f5cd2d6aec62abeb7a849 (patch)
tree88d58600be87a219ea1e3a03eb4e86558c16c100
parent57595577d11812bf41758a334c725a8892c98555 (diff)
downloadorg.eclipse.mylyn.tasks-0f8920518761b7ba9f1f5cd2d6aec62abeb7a849.zip
org.eclipse.mylyn.tasks-0f8920518761b7ba9f1f5cd2d6aec62abeb7a849.tar.gz
org.eclipse.mylyn.tasks-0f8920518761b7ba9f1f5cd2d6aec62abeb7a849.tar.bz2
404711: TaskAttachmentPartSource swallows source exception
Change-Id: I285cfdd5f0bfb569524001c3af3838fe5a2ef5e0 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=404711
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentPartSource.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentPartSource.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentPartSource.java
index 97287f6..71bf0e7 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentPartSource.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentPartSource.java
@@ -16,10 +16,6 @@ import java.io.InputStream;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
/**
* @since 3.1
@@ -40,8 +36,9 @@ public class TaskAttachmentPartSource implements PartSource {
try {
return attachment.createInputStream(null);
} catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error attaching file", e)); //$NON-NLS-1$
- throw new IOException("Failed to create source stream"); //$NON-NLS-1$
+ IOException exception = new IOException("Failed to create source stream"); //$NON-NLS-1$
+ exception.initCause(e);
+ throw exception;
}
}