Examples of BadBidException


Examples of com.jbidwatcher.auction.BadBidException

      String value = rval.getDocument().grep(".*The following must be corrected before continuing.*");
      if(value != null) {
        List<String> foo = rval.getDocument().findSequence(".*Enter.*", ".*or more.*");
        JConfig.log().dump2File("error-" + ebayServer.BID_ERROR_TOO_LOW + ".html", rval.getBuffer());
        throw new BadBidException(foo.get(0) + " " + foo.get(1), ebayServer.BID_ERROR_TOO_LOW);
      }
      List<String> quickBidError = rval.getDocument().findSequence("error", "Enter.(.*).or more");
      if(quickBidError != null) {
        JConfig.log().dump2File("error-" + ebayServer.BID_ERROR_TOO_LOW + ".html", rval.getBuffer());
        throw new BadBidException(quickBidError.get(1), ebayServer.BID_ERROR_TOO_LOW);
      }

      // If maxbid wasn't set, log it in the log file so we can debug it later.
      String maxbid = rval.getForm().getInputValue("maxbid");
      if (maxbid == null || maxbid.length() == 0) {
View Full Code Here

Examples of com.jbidwatcher.auction.BadBidException

      bidMatch.find();
      String matched_error = bidMatch.group().toLowerCase();
      Integer result = getMatchedResult(matched_error);
      JConfig.log().dump2File("error-" + result + ".html", inVal.getBuffer());

      throw new BadBidException(matched_error, result);
    } else {
      String amount = htmlDocument.getNextContentAfterRegex("\\s*Enter\\s*");
      if (amount != null) {
        String orMore = htmlDocument.getNextContent();
        if (orMore != null && orMore.indexOf("or more") != -1) {
          JConfig.log().dump2File("error-" + ebayServer.BID_ERROR_TOO_LOW + ".html", inVal.getBuffer());
          throw new BadBidException("Enter " + amount + orMore, ebayServer.BID_ERROR_TOO_LOW);
        }
      }
    }
  }
View Full Code Here

Examples of com.jbidwatcher.auction.BadBidException

    }
  }

  private void checkSignOn(JHTML htmlDocument) throws BadBidException {
    String signOn = htmlDocument.getTitle();
    if(signOn != null && signOn.equalsIgnoreCase("Sign In")) throw new BadBidException("sign in", AuctionServerInterface.BID_ERROR_CANT_SIGN_IN);
  }
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.