Examples of ArgumentParserException


Examples of net.sourceforge.argparse4j.inf.ArgumentParserException

    }
  }   
 
  private void verifyIsAbsolute(ArgumentParser parser, Path file) throws ArgumentParserException {
    if (!file.isAbsolute()) {
      throw new ArgumentParserException("Not an absolute file: " + file, parser);
    }
  }   
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParserException

    }
  }   
 
  private void verifyHasScheme(ArgumentParser parser, Path file) throws ArgumentParserException {
    if (file.toUri().getScheme() == null) {
      throw new ArgumentParserException("URI scheme is missing in path: " + file, parser);
    }
  }
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParserException

    }
  }

  private void verifyScheme(ArgumentParser parser, Path file) throws ArgumentParserException {
    if (!verifyScheme.equals(file.toUri().getScheme())) {
      throw new ArgumentParserException("Scheme of path: " + file + " must be: " + verifyScheme, parser);
    }
  }
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParserException

      opts.inputFileFormat = getClass(inputFormatArg, ns, FileInputFormat.class, parser, INPUT_FORMAT_SUBSTITUTIONS);
     
      String sparkMaster = System.getProperty("spark.master");
      if (opts.pipelineType == PipelineType.spark) {
        if (sparkMaster == null) {
          throw new ArgumentParserException("--pipeline-type=" + PipelineType.spark + " must not run as a MapReduce job", parser);
        }
      } else if (opts.pipelineType == PipelineType.mapreduce) {
        if (sparkMaster != null) {
          throw new ArgumentParserException("--pipeline-type=" + PipelineType.mapreduce + " must not run as a Spark job", parser);
        }
      }
    } catch (ArgumentParserException e) {
      parser.handleError(e);
      return 1;
View Full Code Here

Examples of org.jboss.aesh.cl.exception.ArgumentParserException

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

Examples of org.jboss.aesh.cl.exception.ArgumentParserException

                    commandLine.addOption(new
                            ParsedOption(active.getName(), active.getLongName(),
                            new OptionProperty(name, value), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    commandLine.addOption(new ParsedOption(active.getName(), active.getLongName(),
                            active.getValue(), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active == null)
                    throw new OptionParserException("Option: "+parseLine+" is not a valid option for this command");
            }
            //name
View Full Code Here

Examples of org.jboss.aesh.cl.exception.ArgumentParserException

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

Examples of org.jboss.aesh.cl.exception.ArgumentParserException

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && active.getValue() != null) {
                    if(!active.getEndsWithSeparator()) {
                        commandLine.addOption(active);
                        active = null;
                    }
                }
                else if(active != null && active.getOptionType().equals(OptionType.BOOLEAN) &&
                        (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

Examples of org.jboss.aesh.cl.exception.ArgumentParserException

                    commandLine.addOption(new
                            ParsedOption(active.getName(), active.getLongName(),
                            new OptionProperty(name, value), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    commandLine.addOption(new ParsedOption(active.getName(), active.getLongName(),
                            active.getValue(), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active == null)
                    throw new OptionParserException("Option: "+parseLine+" is not a valid option for this command");
            }
            //name
View Full Code Here

Examples of org.jboss.aesh.cl.exception.ArgumentParserException

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that does not support it."));
                        }
                    }
                }
                else if(active != null && active.getValue() != null) {
                    if(!active.getEndsWithSeparator()) {
                        commandLine.addOption(active);
                        active = null;
                    }
                }
                else if(active != null && active.getOptionType().equals(OptionType.BOOLEAN) &&
                        (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that does not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.