jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1516247 - /jena/trunk/jena-text/src/main/java/jena/textindexer.java
Date Wed, 21 Aug 2013 18:34:31 GMT
Author: andy
Date: Wed Aug 21 18:34:31 2013
New Revision: 1516247

URL: http://svn.apache.org/r1516247
Log:
Better error messages for zero assembler files.

Modified:
    jena/trunk/jena-text/src/main/java/jena/textindexer.java

Modified: jena/trunk/jena-text/src/main/java/jena/textindexer.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-text/src/main/java/jena/textindexer.java?rev=1516247&r1=1516246&r2=1516247&view=diff
==============================================================================
--- jena/trunk/jena-text/src/main/java/jena/textindexer.java (original)
+++ jena/trunk/jena-text/src/main/java/jena/textindexer.java Wed Aug 21 18:34:31 2013
@@ -71,15 +71,19 @@ public class textindexer extends CmdARQ 
         // Two forms : with and without arg.
         // Maximises similarity with other tools.
         String file ;
+        
+        if ( ! super.contains(assemblerDescDecl) && getNumPositional() == 0 )
+            throw new CmdException("No assembler description given") ;
+        
         if ( super.contains(assemblerDescDecl) ) {
             if ( getValues(assemblerDescDecl).size() != 1 )
-                throw new CmdException("Multiple assembler descriptions given") ;
+                throw new CmdException("Multiple assembler descriptions given via --desc")
;
             if ( getPositional().size() != 0 )
                 throw new CmdException("Additional assembler descriptions given") ; 
             file = getValue(assemblerDescDecl) ;
         } else {
             if ( getNumPositional() != 1 )
-                throw new CmdException("Multiple assembler descriptions given") ;
+                throw new CmdException("Multiple assembler descriptions given as positional
arguments") ;
             file = getPositionalArg(0) ;
         }
         



Mime
View raw message