Examples of ErrorData


Examples of ca.uhn.model.json.Error.ErrorData

    String jsonResponse = callService(data);
    JsonElement jsonTree = new JsonParser().parse(jsonResponse);
    JsonObject response = jsonTree.getAsJsonObject();

    ErrorData error = gson.fromJson(response.get("error"), Error.ErrorData.class);

    if (null != error) {
      String serviceError = "Received error from service: " + error.message;
      if (error.code == Error.INTERNAL_ERROR) {
        throw new InternalErrorException(serviceError);
View Full Code Here

Examples of com.detectlanguage.responses.ErrorData

        Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();

        if (body.contains("\"error\":")) {
            ErrorResponse errorResponse = gson.fromJson(body,
                    ErrorResponse.class);
            ErrorData error = errorResponse.error;
            throw new APIError(error.message, error.code);
        }

        return gson.fromJson(body, responseClass);
    }
View Full Code Here

Examples of com.detectlanguage.responses.ErrorData

    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();

    if (body.contains("\"error\":")) {
      ErrorResponse errorResponse = gson.fromJson(body,
          ErrorResponse.class);
      ErrorData error = errorResponse.error;
      throw new APIError(error.message, error.code);
    }

    return gson.fromJson(body, responseClass);
  }
View Full Code Here

Examples of com.detectlanguage.responses.ErrorData

        Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();

        if (body.contains("\"error\":")) {
            ErrorResponse errorResponse = gson.fromJson(body,
                    ErrorResponse.class);
            ErrorData error = errorResponse.error;
            throw new APIError(error.message, error.code);
        }

        try {
            return gson.fromJson(body, responseClass);
View Full Code Here

Examples of com.detectlanguage.responses.ErrorData

        Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();

        if (body.contains("\"error\":")) {
            ErrorResponse errorResponse = gson.fromJson(body,
                    ErrorResponse.class);
            ErrorData error = errorResponse.error;
            throw new APIError(error.message, error.code);
        }

        return gson.fromJson(body, responseClass);
    }
View Full Code Here

Examples of com.detectlanguage.responses.ErrorData

        Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();

        if (body.contains("\"error\":")) {
            ErrorResponse errorResponse = gson.fromJson(body,
                    ErrorResponse.class);
            ErrorData error = errorResponse.error;
            throw new APIError(error.message, error.code);
        }

        return gson.fromJson(body, responseClass);
    }
View Full Code Here

Examples of javax.servlet.jsp.ErrorData

    if (uri == null)
      return null;

    Integer status = (Integer) getCauchoRequest().getAttribute(AbstractHttpRequest.STATUS_CODE);

    return new ErrorData(getThrowable(),
                         status == null ? 0 : status.intValue(),
                         (String) getCauchoRequest().getAttribute(AbstractHttpRequest.ERROR_URI),
                         (String) getCauchoRequest().getAttribute(AbstractHttpRequest.SERVLET_NAME));
  }
View Full Code Here

Examples of net.sourceforge.processdash.ui.lib.binding.ErrorData

        form.addPropertyChangeListener("defects", this, "updateDefects");
        updateDefects();
    }

    public void updateDefects() {
        ErrorData error = form.getErrorDataForAttr("defects");
        if (error != null) {
            this.errorData = error;
            setDefectData(Collections.EMPTY_LIST);
        } else {
            Object newValue = form.get("defects");
View Full Code Here

Examples of net.sourceforge.processdash.ui.lib.binding.ErrorData

        for (int col = 0;  col < data.getColumnCount();  col++)
            if (data.hasData(col))
                tcm.addColumn(tableColumns[col]);
        table.setColumnModel(tcm);
       
        ErrorData error = data.getErrorData();
        if (error != null) {
            messageLabel.setText(error.getError());
            messageLabel.setForeground(map.getErrorColor(error));
            cardLayout.first(this);
        } else {
            messageLabel.setText(null);
            cardLayout.last(this);
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.