Package co.cask.cdap.shell.exception

Examples of co.cask.cdap.shell.exception.InvalidCommandException


  @Override
  public void process(String[] args, PrintStream output) throws Exception {
    if (args.length == 0) {
      // TODO: print help message
      throw new InvalidCommandException();
    }

    String commandName = args[0];
    Iterable<Command> matches = commandsMap.getValuesForKeysStartingWith(commandName);
    if (Iterables.isEmpty(matches)) {
      throw new InvalidCommandException();
    }

    Command command = matches.iterator().next();
    command.process(Arrays.copyOfRange(args, 1, args.length), output);
  }
View Full Code Here

TOP

Related Classes of co.cask.cdap.shell.exception.InvalidCommandException

Copyright © 2018 www.massapicom. 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.