gradle
8.4

# ProblemBuilder

@Incubating
interface ProblemBuilder(source)

Problem instance builder allowing the specification of all optional fields. This is the last interface in the builder chain. The order of steps can be traced from the Problems service interface. An example of how to use the builder:

     <problemService>.createProblemBuilder()
             .label("test problem")
             .undocumented()
             .noLocation()
             .type(ValidationProblemId.TEST_PROBLEM.name())
             .group(ProblemGroup.TYPE_VALIDATION)
             .severity(Severity.ERROR)
             .details("this is a test")

Content copied to clipboard

## Functions

additionalData
Link copied to clipboard
abstract fun additionalData(key: String, value: String): ProblemBuilder
Specifies arbitrary data associated with this problem.
build
Link copied to clipboard
abstract fun build(): ReportableProblem
Creates the new problem.
details
Link copied to clipboard
abstract fun details(details: String): ProblemBuilder
The long description of this problem.
severity
Link copied to clipboard
abstract fun severity(severity: Severity): ProblemBuilder
Declares the severity of the problem.
solution
Link copied to clipboard
abstract fun solution(solution: String): ProblemBuilder
The description of how to solve this problem
withException
Link copied to clipboard
abstract fun withException(e: RuntimeException): ProblemBuilder
The exception causing this problem.