<p>failure.</p>

@param message a {@link java.lang.String} object.
@param description a {@link java.lang.String} object.
@return a {@link ameba.util.Result} object.
425695
public static Result failure(String message, String description) {
        return new Result(message, description, null);
    }
897693
public String getDescription() {
        if (description != null) {
            return description;
        }
        if (UNKNOWN_ERROR.equals(getCode())) {
            return String.format("Received error with code %s", getCode());
        }
        return "Failed with unknown error";
    }
200291
public static Matcher<PrintableResult> hasFailureContaining(final String string) {
        return new TypeSafeMatcher<PrintableResult>() {
            @Override
            public boolean matchesSafely(PrintableResult item) {
                return item.failureCount() > 0 && item.toString().contains(string);
            }

            public void describeTo(Description description) {
                description.appendText("has failure containing " + string);
            }
        };
    }
751845
public static <T extends Exception> org.hamcrest.Matcher<T> hasMessage(
            String expectedMessage) {
        return new ExceptionMessageMatcher<>(expectedMessage);
    }
31678
public static <E> Response<E> failure(String message, String code) {
        return new Response<>(false, message, code);
    }
725359
public <T extends Map<?, ?>> T notEmpty(final T map, final String message) {
        if (map == null) {
            failNull(message);
        }
        if (map.isEmpty()) {
            fail(message);
        }
        return map;
    }
1170555
private M invalidMessage(Exception cause) {
        state = State.BAD_MESSAGE;
        M message = buildInvalidMessage();
        message.setDecoderResult(DecoderResult.failure(cause));
        return message;
    }
1126486
@Nonnull
  public static Error fail(@Nullable final String message) {
    final AssertionError error = new AssertionError(GetUtils.ensureNonNull(message, "failed"));
    MetaErrorListeners.fireError("Asserion error", error);
    if (true) {
      throw error;
    }
    return error;
  }
317439
public void error(String message, String sourceString,
                    int position, int startPosition, int endPosition,
                    Object info) {
    report(new AnnotationReport(Kind.ERROR, message, sourceString,
                                position, startPosition, endPosition, info));
  }
1188010
public synchronized void setJobAsFailed(String errorMessage) {
    mJobInfo.setStatus(Status.FAILED);
    mJobInfo.setErrorMessage(errorMessage);
  }
564527
protected static String message(Object message)
  {
    if(message == null) {
      return null;
    }
    if(!(message instanceof Throwable)) {
      return message.toString();
    }

    Throwable t = (Throwable)message;
    if(t.getCause() == null) {
      return t.toString();
    }

    int nestingLevel = 0;
    StringBuilder sb = new StringBuilder();
    for(;;) {
      sb.append(t.getClass().getName());
      sb.append(":");
      sb.append(" ");
      if(++nestingLevel == 8) {
        sb.append("...");
        break;
      }
      if(t.getCause() == null) {
        String s = t.getMessage();
        if(s == null) {
          t.getClass().getCanonicalName();
        }
        sb.append(s);
        break;
      }
      t = t.getCause();
    }
    return sb.toString();
  }
264836
public static void fail(String message, Object... args) {
		throw new IllegalStateException(message == null ? "" : String.format(message, args));
	}
419182
@Factory
    public static <T extends Throwable> Matcher<T> withMessage(final Matcher<String> matcher) {
        return new CustomTypeSafeMatcher<T>(CustomMatchers.fixedDescription("message ", matcher)) {
            @Override
            protected boolean matchesSafely(T item) {
                return matcher.matches(item.getMessage());
            }

            public void describeMismatchSafely(T item, Description mismatchDescription) {
                matcher.describeMismatch(item.getMessage(), mismatchDescription);
            }
        };
    }
966406
public static <R> MethodResult<R> internalFailure(Throwable failure) {
        return new MethodResult<R>(null, failure, true);
    }
1306171
public byte[] sendWithResult(final byte[] message) {
        synchronized (webSocketHandler.getNotifyResultObject()) {
            webSocketHandler.sendMessage(message);

            try {
                webSocketHandler.getNotifyResultObject().wait(TimeUnit.SECONDS.toMillis(ANSWER_TIMEOUT));
            }
            catch (InterruptedException e) {
                return null;
            }

            return webSocketHandler.getResultBytes();
        }
    }
287646
public static LdapException create(LdapResultCode resultCode, String message) {
        return new LdapException(resultCode, message, null);
    }
701526
static SoyAutoescapeException createWithNode(String message, SoyNode node) {
    return new SoyAutoescapeException(message, /*cause=*/ null, node);
  }