@Incubating public interface Problems
The main purpose of this API is to allow clients to create configure and report problems in a centralized way.
Reported problems are exposed via build operation progress events, which then be converted to Tooling API progress events.
Modifier and Type | Method | Description |
---|---|---|
ReportableProblem |
create(ProblemBuilderSpec action) |
Configures a new problem.
|
java.lang.RuntimeException |
rethrowing(java.lang.RuntimeException e,
ProblemBuilderSpec action) |
Configures a new problem with error severity using an existing exception as input, reports it and uses it to throw a new exception.
|
java.lang.RuntimeException |
throwing(ProblemBuilderSpec action) |
Configures a new problem with error severity, reports it and uses it to throw a new exception.
|
java.lang.RuntimeException throwing(ProblemBuilderSpec action)
java.lang.RuntimeException rethrowing(java.lang.RuntimeException e, ProblemBuilderSpec action)
ReportableProblem create(ProblemBuilderSpec action)
The method uses a stepwise builder pattern in the provided ProblemBuilderSpec
, forcing the clients to define all mandatory fields in a specific order.
If all required fields are provided, the method creates and returns a new problem.
Problems should be reported separately with ReportableProblem.report()
.