ProblemReporter (Gradle API 8.12.1)
Description: declaration: package: org.gradle.api.problems, interface: ProblemReporter

Package org.gradle.api.problems

# Interface ProblemReporter

@Incubating public interface ProblemReporter
Defines different ways to report problems.

Since:
  8.6

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `reporting(Action<ProblemSpec> spec)`
  Configures and reports a new problem.
  `RuntimeException`
  `throwing(Action<ProblemSpec> spec)`
  Configures a new problem, reports it, and uses it to throw a new exception.

- ## Method Details

  - ### reporting

    void reporting(Action<ProblemSpec> spec)
    Configures and reports a new problem.

    The spec must specify the problem label and the category. Any additional configuration is optional.

    Parameters:
      `spec` - the problem configuration
    Since:
      8.6

  - ### throwing

    RuntimeException throwing(Action<ProblemSpec> spec)
    Configures a new problem, reports it, and uses it to throw a new exception.

    An exception must be provided in the spec.

    The spec must specify the exception, the problem label, and the category. Any additional configuration is optional.

    Returns:
      never returns by throwing the exception, but using `throw` statement at the call site is encouraged to indicate the intent and benefit from local control flow.
    Since:
      8.6