Examples of reason()


Examples of org.elasticsearch.cluster.metadata.SnapshotMetaData.ShardSnapshotStatus.reason()

                    for (Map.Entry<ShardId, ShardSnapshotStatus> shardStatus : entry.shards().entrySet()) {
                        ShardId shardId = shardStatus.getKey();
                        ShardSnapshotStatus status = shardStatus.getValue();
                        if (status.state().failed()) {
                            failures.add(new ShardSearchFailure(status.reason(), new SearchShardTarget(status.nodeId(), shardId.getIndex(), shardId.id())));
                            shardFailures.add(new SnapshotShardFailure(status.nodeId(), shardId.getIndex(), shardId.id(), status.reason()));
                        }
                    }
                    Snapshot snapshot = repository.finalizeSnapshot(snapshotId, failure, entry.shards().size(), ImmutableList.copyOf(shardFailures));
                    removeSnapshotFromClusterState(snapshotId, new SnapshotInfo(snapshot), null);
                } catch (Throwable t) {
View Full Code Here

Examples of org.jruby.RubyLocalJumpError.reason()

        RubyException exception = re.getException();
        Ruby runtime = exception.getRuntime();
        if (runtime.getLocalJumpError().isInstance(exception)) {
            RubyLocalJumpError jumpError = (RubyLocalJumpError)re.getException();

            IRubyObject reason = jumpError.reason();

            return reason.asJavaString();
        }

        throw re;
View Full Code Here

Examples of org.jruby.RubyLocalJumpError.reason()

                    break loop;
                } catch (RaiseException re) {
                    if (runtime.getLocalJumpError().isInstance(re.getException())) {
                        RubyLocalJumpError jumpError = (RubyLocalJumpError)re.getException();
                       
                        IRubyObject reason = jumpError.reason();
                       
                        // admittedly inefficient
                        if (reason.asJavaString().equals("break")) {
                            return jumpError.exit_value();
                        } else if (reason.asJavaString().equals("next")) {
View Full Code Here

Examples of org.jruby.RubyLocalJumpError.reason()

        RubyException exception = re.getException();
        Ruby runtime = exception.getRuntime();
        if (runtime.getLocalJumpError().isInstance(exception)) {
            RubyLocalJumpError jumpError = (RubyLocalJumpError)re.getException();

            IRubyObject reason = jumpError.reason();

            return reason.asJavaString();
        }

        throw re;
View Full Code Here

Examples of org.jruby.RubyLocalJumpError.reason()

                    break loop;
                } catch (RaiseException re) {
                    if (runtime.getLocalJumpError().isInstance(re.getException())) {
                        RubyLocalJumpError jumpError = (RubyLocalJumpError)re.getException();
                       
                        IRubyObject reason = jumpError.reason();
                       
                        // admittedly inefficient
                        if (reason.asJavaString().equals("break")) {
                            return jumpError.exit_value();
                        } else if (reason.asJavaString().equals("next")) {
View Full Code Here

Examples of org.springframework.web.bind.annotation.ResponseStatus.reason()

    super(handler, method);

    ResponseStatus annotation = getMethodAnnotation(ResponseStatus.class);
    if (annotation != null) {
      this.responseStatus = annotation.value();
      this.responseReason = annotation.reason();
    }
  }

  /**
   * Invokes the method and handles the return value through a registered {@link HandlerMethodReturnValueHandler}.
View Full Code Here

Examples of org.springframework.web.bind.annotation.ResponseStatus.reason()

      throws Exception {

    ResponseStatus responseStatusAnn = AnnotationUtils.findAnnotation(handlerMethod, ResponseStatus.class);
    if (responseStatusAnn != null) {
      HttpStatus responseStatus = responseStatusAnn.value();
      String reason = responseStatusAnn.reason();
      if (!StringUtils.hasText(reason)) {
        webRequest.getResponse().setStatus(responseStatus.value());
      }
      else {
        webRequest.getResponse().sendError(responseStatus.value(), reason);
View Full Code Here

Examples of org.springframework.web.bind.annotation.ResponseStatus.reason()

  private void initResponseStatus() {
    ResponseStatus annot = getMethodAnnotation(ResponseStatus.class);
    if (annot != null) {
      this.responseStatus = annot.value();
      this.responseReason = annot.reason();
    }
  }

  /**
   * Register {@link HandlerMethodReturnValueHandler} instances to use to
View Full Code Here

Examples of org.springframework.web.bind.annotation.ResponseStatus.reason()

        ExtendedModelMap implicitModel, ServletWebRequest webRequest) throws Exception {

      ResponseStatus responseStatusAnn = AnnotationUtils.findAnnotation(handlerMethod, ResponseStatus.class);
      if (responseStatusAnn != null) {
        HttpStatus responseStatus = responseStatusAnn.value();
        String reason = responseStatusAnn.reason();
        if (!StringUtils.hasText(reason)) {
          webRequest.getResponse().setStatus(responseStatus.value());
        }
        else {
          webRequest.getResponse().sendError(responseStatus.value(), reason);
View Full Code Here

Examples of org.springframework.web.bind.annotation.ResponseStatus.reason()

        ExtendedModelMap implicitModel, ServletWebRequest webRequest) throws Exception {

      ResponseStatus responseStatusAnn = AnnotationUtils.findAnnotation(handlerMethod, ResponseStatus.class);
      if (responseStatusAnn != null) {
        HttpStatus responseStatus = responseStatusAnn.value();
        String reason = responseStatusAnn.reason();
        if (!StringUtils.hasText(reason)) {
          webRequest.getResponse().setStatus(responseStatus.value());
        }
        else {
          webRequest.getResponse().sendError(responseStatus.value(), reason);
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.