Failure (Gradle API 9.1.0)
Description: declaration: package: org.gradle.tooling, interface: Failure

Package org.gradle.tooling

# Interface Failure

All Known Subinterfaces:
  `FileComparisonTestAssertionFailure`, `TestAssertionFailure`, `TestFailure`, `TestFrameworkFailure`

public interface Failure
Represents a failure. Failures are similar to exceptions but carry less information (only a message, a description and a cause) so they can be used in a wider scope than just the JVM where the exception failed.

Since:
  2.4

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<? extends Failure>`
  `getCauses()`
  Returns the underlying causes for this failure, if any.
  `@Nullable String`
  `getDescription()`
  Returns a long description of the failure.
  `@Nullable String`
  `getMessage()`
  Returns a short message (typically one line) for the failure.
  `List<Problem>`
  `getProblems()`
  Returns the problems associated with this failure.

- ## Method Details

  - ### getMessage

    @Nullable String getMessage()
    Returns a short message (typically one line) for the failure.
    Returns:
      the failure message

  - ### getDescription

    @Nullable String getDescription()
    Returns a long description of the failure. For example, a stack trace.
    Returns:
      a long description of the failure

  - ### getCauses

    List<? extends Failure> getCauses()
    Returns the underlying causes for this failure, if any.
    Returns:
      the causes for this failure. Returns an empty list if this failure has no causes.

  - ### getProblems

    @Incubating List<Problem> getProblems()
    Returns the problems associated with this failure.
    Returns:
      The problems, or an empty list if there are no problems.
    Since:
      8.12