gracefully handle missing keyspace argument (cli)

Patch by Hafsteinn Baldvinsson; reviewed by eevans for CASSANDRA-551

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@835990 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Evans 2009-11-13 21:13:31 +00:00
parent b5f3263839
commit b2b4260c68
1 changed files with 7 additions and 1 deletions

View File

@ -251,8 +251,14 @@ public class CliClient
// Get table name
int childCount = ast.getChildCount();
assert(childCount == 1);
String tableName = ast.getChild(0).getText();
if( tableName == null ) {
css_.out.println("Keyspace argument required");
return;
}
// Describe and display
Map<String, Map<String, String>> columnFamiliesMap;
try {