Examples of handleError()


Examples of de.creepsmash.server.Client.handleError()

    if (towerId <= 0) {
      client.handleError(ErrorType.Error,
          "Invalid tower id (tried to change strategy " + towerId + ")");
      return;
    } else if (towerId >= this.nextTowerId) {
      client.handleError(ErrorType.Error,
          "No such tower (tried to change strategy " + towerId + ")");
      return;
    }

    ChangeStrategyRoundMessage csm = new ChangeStrategyRoundMessage();
View Full Code Here

Examples of de.creepsmash.server.Client.handleError()

    int towerId = m.getTowerId();

    // sanity checks on the id
    Client client = sender.getClient();
    if (towerId <= 0) {
      client.handleError(ErrorType.Error,
          "Invalid tower id (tried to upgrade tower " + towerId + ")");
      return;
    } else if (towerId >= this.nextTowerId) {
      client.handleError(ErrorType.Error,
          "No such tower (tried to upgrade tower " + towerId + ")");
View Full Code Here

Examples of de.creepsmash.server.Client.handleError()

    if (towerId <= 0) {
      client.handleError(ErrorType.Error,
          "Invalid tower id (tried to upgrade tower " + towerId + ")");
      return;
    } else if (towerId >= this.nextTowerId) {
      client.handleError(ErrorType.Error,
          "No such tower (tried to upgrade tower " + towerId + ")");
      return;
    }

    UpgradeTowerRoundMessage n = new UpgradeTowerRoundMessage();
View Full Code Here

Examples of de.creepsmash.server.Client.handleError()

    int towerId = m.getTowerId();

    // sanity checks on the id
    Client client = sender.getClient();
    if (towerId <= 0) {
      client.handleError(ErrorType.Error,
          "Invalid tower id (tried to sell tower " + towerId + ")");
      return;
    } else if (towerId >= this.nextTowerId) {
      client.handleError(ErrorType.Error,
          "No such tower (tried to sell tower " + towerId + ")");
View Full Code Here

Examples of de.creepsmash.server.Client.handleError()

    if (towerId <= 0) {
      client.handleError(ErrorType.Error,
          "Invalid tower id (tried to sell tower " + towerId + ")");
      return;
    } else if (towerId >= this.nextTowerId) {
      client.handleError(ErrorType.Error,
          "No such tower (tried to sell tower " + towerId + ")");
      return;
    }

    SellTowerRoundMessage n = new SellTowerRoundMessage();
View Full Code Here

Examples of de.creepsmash.server.Client.handleError()

  private GameState handle(GameOverMessage m, PlayerInGame sender) {
    int position = m.getPosition();
    Client client = sender.getClient();

    if (position < 1) {
      client.handleError(ErrorType.Error, "position in GAME_OVER must be > 0");   
      return this;
    }

    this.playerNamePositionMap.put(client.getUserName(), position);
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParser.handleError()

            try {
                ns = parser.parseArgs(args);
            } catch (FoundHelpArgument e) {
                return 0;
            } catch (ArgumentParserException e) {
                parser.handleError(e);
                return 1;
            }

            opts.log4jConfigFile = (File) ns.get(log4jConfigFileArg.getDest());
            if (opts.log4jConfigFile != null) {
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParser.handleError()

            opts.collection = ns.getString(collectionArg.getDest());

            try {
                verifyGoLiveArgs(opts, parser);
            } catch (ArgumentParserException e) {
                parser.handleError(e);
                return 1;
            }

            if (opts.inputLists.isEmpty() && opts.inputFiles.isEmpty()) {
                LOG.info("No input files specified - nothing to process");
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParser.handleError()

        try {
            ns = parser.parseArgs(args);
        } catch (FoundHelpArgument e) {
            return 0;
        } catch (ArgumentParserException e) {
            parser.handleError(e);
            return 1;
        }

        opts.log4jConfigFile = (File) ns.get(log4jConfigFileArg.getDest());
        if (opts.log4jConfigFile != null) {
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParser.handleError()

                opts.evaluate();
            } catch (IllegalStateException ise) {
                throw new ArgumentParserException(ise.getMessage(), parser);
            }
        } catch (ArgumentParserException e) {
            parser.handleError(e);
            return 1;
        }

        return null;
    }
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.