Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-11-04 20:00:48 -0500
committermkersten2005-11-04 20:00:48 -0500
commit961de6f1de144cd8ca2b4a56476654bb8854baae (patch)
treeb73628f0af2493c684c57f4adc407f6b9916c463
parent89d4e185b5ac62ee587b7f75550058ad69ccf067 (diff)
downloadorg.eclipse.mylyn.tasks-961de6f1de144cd8ca2b4a56476654bb8854baae.tar.gz
org.eclipse.mylyn.tasks-961de6f1de144cd8ca2b4a56476654bb8854baae.tar.xz
org.eclipse.mylyn.tasks-961de6f1de144cd8ca2b4a56476654bb8854baae.zip
Exception handling
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugzillaRepository.java25
1 files changed, 14 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugzillaRepository.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugzillaRepository.java
index bf34876a3..72c8662dc 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugzillaRepository.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugzillaRepository.java
@@ -141,7 +141,7 @@ public class BugzillaRepository
// get the actual bug fron the server and return it
BugReport bug = BugParser.parseBug(in, id, BugzillaPlugin.getDefault().getServerName(), BugzillaPlugin.getDefault().isServerCompatability218(), BugzillaPreferencePage.getUserName(), BugzillaPreferencePage.getPassword());
- return bug;
+ return bug;
}
}
// TODO handle the error
@@ -159,16 +159,19 @@ public class BugzillaRepository
}
catch(Exception e) {
// throw an exception if there is a problem reading the bug from the server
- e.printStackTrace();
- throw new IOException(e.getMessage());
- }
- finally
- {
- try{
- if(in != null)
- in.close();
- }catch(IOException e)
- {
+// e.printStackTrace();
+// throw new IOException(e.getMessage());
+ BugzillaPlugin.log(new Status(
+ IStatus.ERROR,
+ IBugzillaConstants.PLUGIN_ID,
+ IStatus.ERROR,
+ "Problem getting report",
+ e));
+ return null;
+ } finally {
+ try {
+ if(in != null) in.close();
+ } catch(IOException e) {
BugzillaPlugin.log(new Status(IStatus.ERROR, IBugzillaConstants.PLUGIN_ID,IStatus.ERROR,"Problem closing the stream", e));
}
}

Back to the top