You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/11/08 16:56:30 UTC

[5/5] jena git commit: Better error message --conf and dataset name.

Better error message --conf and dataset name.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/7e700034
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/7e700034
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/7e700034

Branch: refs/heads/master
Commit: 7e70003475d46c431e1fd7fc0b829a18152b1fe9
Parents: 536149d
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Nov 6 11:20:03 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Nov 8 15:55:55 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/7e700034/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
index e8f6dd9..549e277 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
@@ -201,8 +201,14 @@ public class FusekiCmd {
             boolean cmdlineConfigPresent = ( x != 0 ) ;
             if ( cmdlineConfigPresent && getPositional().size() == 0 )
                 throw new CmdException("Missing service name") ;
+
+            if ( cmdLineConfig.fusekiCmdLineConfigFile != null && getPositional().size() > 0 )
+                throw new CmdException("Service name will come from --conf; no command line service name allowed") ;
+
+            
             if ( !cmdlineConfigPresent && getPositional().size() > 0 )
                 throw new CmdException("Service name given but no configuration argument to match (e.g. --mem, --loc/--tdb, --file)") ;
+            
             if ( cmdlineConfigPresent && getPositional().size() > 1 )
                 throw new CmdException("Multiple dataset path names given") ;