Author: ruschein
Date: 2010-07-16 12:38:43 -0700 (Fri, 16 Jul 2010)
New Revision: 20950
Modified:
cytoscape/trunk/src/cytoscape/util/URLUtil.java
cytoscape/trunk/tests/cytoscape/plugin/PluginManagerTest.java
Log:
Improved error reporting.
Modified: cytoscape/trunk/src/cytoscape/util/URLUtil.java
===================================================================
--- cytoscape/trunk/src/cytoscape/util/URLUtil.java 2010-07-16 16:34:02 UTC
(rev 20949)
+++ cytoscape/trunk/src/cytoscape/util/URLUtil.java 2010-07-16 19:38:43 UTC
(rev 20950)
@@ -101,7 +101,14 @@
"getBasicInputStream was given a null
'source' argument.");
}
URLConnection uc = getURLConnection(source);
- return uc.getInputStream();
+
+ final InputStream is;
+ try {
+ is = uc.getInputStream();
+ } catch (final Exception e) {
+ throw new IllegalStateException("Failed to get input
stream for \"" + source + "\"!");
+ }
+ return is;
}
/**
Modified: cytoscape/trunk/tests/cytoscape/plugin/PluginManagerTest.java
===================================================================
--- cytoscape/trunk/tests/cytoscape/plugin/PluginManagerTest.java
2010-07-16 16:34:02 UTC (rev 20949)
+++ cytoscape/trunk/tests/cytoscape/plugin/PluginManagerTest.java
2010-07-16 19:38:43 UTC (rev 20950)
@@ -145,7 +145,7 @@
String Url = "http://google.com/x.xml";
try {
mgr.inquire(Url);
- } catch (java.io.IOException e) {
+ } catch (IllegalStateException e) {
assertNotNull(e);
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.