Package org.parse4j

Examples of org.parse4j.ParseException


    int statusCode = httpResponse.getStatusLine().getStatusCode();
    return (statusCode < 200 || statusCode >= 300);
  }

  static ParseException getConnectionFailedException(String message) {
    return new ParseException(ParseException.CONNECTION_FAILED,
        "Connection failed with Parse servers.  Log: " + message);
  }
View Full Code Here


  }
 
  public ParseException getException() {

    if (hasConnectionFailed()) {
      return new ParseException(ParseException.CONNECTION_FAILED,
          "Connection to Parse servers failed.");
    }

    if (!hasErrorCode()) {
      return new ParseException(ParseException.OPERATION_FORBIDDEN,
          "getException called with successful response");
    }

    JSONObject response = getJsonObject();

    if (response == null) {
      return new ParseException(ParseException.INVALID_JSON,
          "Invalid response from Parse servers.");
    }
   
    return getParseError(response);
  }
View Full Code Here

    }
    catch(JSONException e) {
      error = "Error undefinted by Parse server.";
    }
   
    return new ParseException(code, error);
  }
View Full Code Here

TOP

Related Classes of org.parse4j.ParseException

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.