Package org.gradle.api.problems
Schnittstelle ProblemReporter
Defines different ways to report problems.
- Seit:
- 8.6
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcreate(ProblemId problemId, Action<? super ProblemSpec> action) Creates a new problem without reporting it immediately.voidreport(Collection<? extends Problem> problems) Reports the target problems.voidReports the target problem.voidreport(ProblemId problemId, Action<? super ProblemSpec> spec) Configures and reports a new problem.throwing(Throwable exception, Collection<? extends Problem> problems) Reports the target problems and throws a runtime exception.Configures a new problem, reports it, and uses it to throw a new exception.throwing(Throwable exception, ProblemId problemId, Action<? super ProblemSpec> spec) Configures a new problem, reports it, and uses it to throw a new exception.
-
Methodendetails
-
create
Creates a new problem without reporting it immediately. The created problem can be later reported withreport(Problem).- Parameter:
problemId- The problem idaction- The problem configuration.- Gibt zurück:
- The new problem.
- Seit:
- 8.13
-
report
Configures and reports a new problem.The spec must specify the problem label and the category. Any additional configuration is optional.
- Parameter:
problemId- the problem idspec- the problem configuration- Seit:
- 8.13
-
report
Reports the target problem.- Parameter:
problem- The problem to report.- Seit:
- 8.13
-
report
Reports the target problems.- Parameter:
problems- The problems to report.- Seit:
- 8.13
-
throwing
RuntimeException throwing(Throwable exception, ProblemId problemId, Action<? super 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.
- Parameter:
exception- the exception to throw after reporting the problemsproblemId- the problem idspec- the problem configuration- Gibt zurück:
- never returns by throwing the exception, but using
throwstatement at the call site is encouraged to indicate the intent and benefit from local control flow. - Seit:
- 8.13
-
throwing
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.
- Parameter:
exception- the exception to throw after reporting the problemsproblem- the problem to report- Gibt zurück:
- never returns by throwing the exception, but using
throwstatement at the call site is encouraged to indicate the intent and benefit from local control flow. - Seit:
- 8.13
-
throwing
Reports the target problems and throws a runtime exception. When this method is used, all reported problems will be associated with the thrown exception.- Parameter:
exception- the exception to throw after reporting the problemsproblems- the problems to report- Gibt zurück:
- nothing, the method throws an exception
- Seit:
- 8.13
-