Interface ProblemReporter


  • @Incubating
    public interface ProblemReporter
    Defines different ways to report problems.
    Since:
    8.6
    • Method Detail

      • 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

        java.lang.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:
        nothing, the method throws an exception
        Since:
        8.6
      • rethrowing

        java.lang.RuntimeException rethrowing​(java.lang.RuntimeException e,
                                              Action<ProblemSpec> spec)
        Configures a new problem using an existing exception as input, reports it, and uses it to throw a new exception.

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

        Returns:
        nothing, the method throws an exception
        Since:
        8.6