diff audioDB.cpp @ 337:ccf15a8c3e46

gengetopt does not support multiple dependencies, so added test for database_given for INDEX command. Still cannot figure out why sometimes error(...) throws char* exception and SIG_ABORT
author mas01mc
date Fri, 05 Sep 2008 14:35:44 +0000
parents 100cf66a5825
children cdb31e8b94e3
line wrap: on
line diff
--- a/audioDB.cpp	Fri Sep 05 14:16:21 2008 +0000
+++ b/audioDB.cpp	Fri Sep 05 14:35:44 2008 +0000
@@ -458,6 +458,8 @@
     if(!(sequenceLength>0 && sequenceLength <= O2_MAXSEQLEN))
       error("INDEXing requires 1 <= sequenceLength <= 1000");
     command=COM_INDEX;
+    if(!args_info.database_given)
+      error("INDEXing requires a database");
     dbName=args_info.database_arg;
 
     // Whether to store LSH hash tables for query in core (FORMAT2)