Author: scooter
Date: 2011-02-03 08:17:29 -0800 (Thu, 03 Feb 2011)
New Revision: 24008

Modified:
   
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/EdgeNamespace.java
   
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddEdgeNetwork.java
   
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddNodeNetwork.java
Log:
A little more clean-up.


Modified: 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/EdgeNamespace.java
===================================================================
--- 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/EdgeNamespace.java
   2011-02-03 04:00:39 UTC (rev 24007)
+++ 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/EdgeNamespace.java
   2011-02-03 16:17:29 UTC (rev 24008)
@@ -247,6 +247,8 @@
                        List<String>attrList = Arrays.asList(attrNames);
                        result.addResult(attrList);
                        result.addMessage("Edge attributes: 
"+AttributeUtils.attributeNamesToList(edgeAttributes, attrList));
+               } else {
+                       throw new CyCommandException("edge: unknown command: 
"+command);
                }
                return result;
        }

Modified: 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddEdgeNetwork.java
===================================================================
--- 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddEdgeNetwork.java
  2011-02-03 04:00:39 UTC (rev 24007)
+++ 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddEdgeNetwork.java
  2011-02-03 16:17:29 UTC (rev 24008)
@@ -84,6 +84,8 @@
                CyNetwork network = getNetwork(command, args);
 
                List<CyEdge> edgeList = getEdgeList(network, result, args, 
true);
+               if (edgeList == null)
+                       throw new CyCommandException("add edges requires an 
'edge' or an 'edgelist' argument");
                for (CyEdge edge: edgeList) {
                        network.addEdge(edge);
                }

Modified: 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddNodeNetwork.java
===================================================================
--- 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddNodeNetwork.java
  2011-02-03 04:00:39 UTC (rev 24007)
+++ 
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/network/AddNodeNetwork.java
  2011-02-03 16:17:29 UTC (rev 24008)
@@ -83,6 +83,8 @@
                CyNetwork network = getNetwork(command, args);
 
                List<CyNode> nodeList = getNodeList(network, result, args, 
true);
+               if (nodeList == null)
+                       throw new CyCommandException("add nodes requires a 
'node' or a 'nodelist' argument");
                for (CyNode node: nodeList) {
                        network.addNode(node);
                }

-- 
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.

Reply via email to