Examples of ErrorCode


Examples of com.facebook.presto.spi.ErrorCode

            elapsedTime = Duration.nanosSince(createNanos);
        }

        // don't report failure info is query is marked as success
        FailureInfo failureInfo = null;
        ErrorCode errorCode = null;
        if (state != FINISHED) {
            failureInfo = toFailure(failureCause);
            errorCode = ErrorCodes.toErrorCode(failureCause);
        }
View Full Code Here

Examples of com.foundationdb.server.error.ErrorCode

        if(!method.equals(HttpMethods.GET) && !method.equals(HttpMethods.POST) && !method.equals(HttpMethods.HEAD)) {
            return;
        }

        final String message;
        final ErrorCode error;
        final String note;
        if(response.getStatus() == HttpServletResponse.SC_NOT_FOUND) {
            message = "Path not found";
            if (!request.getRequestURI().contains("/v1/")) {
                note = "try including /v1/ in the path";
            } else {
                note = null;
            }
            error = ErrorCode.MALFORMED_REQUEST;
        } else {
            if (response instanceof Response) {
                note = ((Response)response).getReason();
            } else {
                note = null;
            }
            message = HttpStatus.getMessage(response.getStatus());
            error = ErrorCode.INTERNAL_ERROR;
        }

        response.setContentType(MediaType.APPLICATION_JSON);
        response.setHeader(HttpHeaders.CACHE_CONTROL, getCacheControl());

        StringBuilder builder = new StringBuilder();
        RestResponseBuilder.formatJsonError(builder, error.getFormattedValue(), message, note);
        builder.append('\n');

        response.setContentLength(builder.length());
        OutputStream out = response.getOutputStream();
        out.write(builder.toString().getBytes());
View Full Code Here

Examples of com.google.appengine.api.socket.SocketServicePb.RemoteSocketServiceError.ErrorCode

        response.mergeFrom(responseBytes);
      }
      return true;
    } catch (ApiProxy.ApplicationException exception) {
      if (serviceError != null) {
        ErrorCode errorCode =
            RemoteSocketServiceError.ErrorCode.valueOf(exception.getApplicationError());
        switch (errorCode) {
          case SYSTEM_ERROR:
          case GAI_ERROR: {
            parseErrorDetail(exception.getErrorDetail(), serviceError);
View Full Code Here

Examples of com.google.appengine.api.socket.SocketServicePb.RemoteSocketServiceError.ErrorCode

  byte[] apiProxyMakeSyncCall(String method, byte[] request) {
    return ApiProxy.makeSyncCall(PACKAGE, method, request);
  }

  static SocketException translateError(int error, String detail) {
    ErrorCode errorCode = RemoteSocketServiceError.ErrorCode.valueOf(error);

    switch (errorCode) {
      case SYSTEM_ERROR:
        return new SocketException("System error: " + detail);
      case GAI_ERROR:
View Full Code Here

Examples of com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.ErrorCode

  }

  private Throwable convertApplicationException(URL requestUrl,
                                                ApiProxy.ApplicationException ex) {
    String urlString = requestUrl.toString();
    ErrorCode errorCode = ErrorCode.valueOf(ex.getApplicationError());
    String errorDetail = ex.getErrorDetail();
    switch (errorCode) {
      case INVALID_URL:
        return new MalformedURLException(
            getURLExceptionMessage("Invalid URL specified: %s", urlString, errorDetail));
View Full Code Here

Examples of com.google.apphosting.api.logservice.LogServicePb.LogServiceError.ErrorCode

      @Override
      protected Throwable convertException(Throwable cause) {
        if (cause instanceof ApiProxy.ApplicationException) {
          ApiProxy.ApplicationException e = (ApiProxy.ApplicationException) cause;
          ErrorCode errorCode = LogServiceError.ErrorCode.valueOf(e.getApplicationError());
          if (errorCode == LogServiceError.ErrorCode.INVALID_REQUEST) {
            return new InvalidRequestException(e.getErrorDetail());
          }
          return new LogServiceException(e.getErrorDetail());
        }
View Full Code Here

Examples of com.google.apphosting.api.logservice.LogServicePb.LogServiceError.ErrorCode

      @Override
      protected Throwable convertException(Throwable cause) {
        if (cause instanceof ApiProxy.ApplicationException) {
          ApiProxy.ApplicationException e = (ApiProxy.ApplicationException) cause;
          ErrorCode errorCode = LogServiceError.ErrorCode.valueOf(e.getApplicationError());
          if (errorCode == LogServiceError.ErrorCode.INVALID_REQUEST) {
            return new InvalidRequestException(e.getErrorDetail());
          }
          return new LogServiceException(e.getErrorDetail());
        }
View Full Code Here

Examples of com.google.dart.engine.error.ErrorCode

      this.listener = listener;
    }

    @Override
    public void onError(AnalysisError error) {
      ErrorCode errorCode = error.getErrorCode();
      if (errorCode == StaticWarningCode.UNDEFINED_GETTER
          || errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER
          || errorCode == StaticTypeWarningCode.UNDEFINED_GETTER) {
        return;
      }
View Full Code Here

Examples of com.iisigroup.cap.base.model.ErrorCode

    MemoryUsage heap1 = ManagementUtils.getCurrentMemUsage();

    errorCodeCache.clear();
    List<ErrorCode> list = errorCodeDao.findByAll();
    for (ErrorCode origin : list) {
      ErrorCode targe = new ErrorCode();
      try {
        CapBeanUtil.copyBean(origin, targe);
        errorCodeCache.put(
            getCacheKey(origin.getCode(), origin.getLocale()),
            targe);
View Full Code Here

Examples of com.linkedin.helix.messaging.handling.MessageHandler.ErrorCode

    HelixTaskResult taskResult = new HelixTaskResult();

    Exception exception = null;
    ErrorType type = ErrorType.INTERNAL;
    ErrorCode code = ErrorCode.ERROR;

    long start = System.currentTimeMillis();
    logger.info("msg:" + _message.getMsgId() + " handling task begin, at: " + start);
    HelixDataAccessor accessor = _manager.getHelixDataAccessor();
    _statusUpdateUtil.logInfo(_message,
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.