Class ValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
build.codemodel.dependency.injection.InjectionException
build.codemodel.dependency.injection.ValidationException
- All Implemented Interfaces:
Serializable
Thrown by
Context.validate() when one or more validation problems are found. Unlike exceptions
thrown during injection, this collects all detected problems and reports them together so the
caller can fix multiple issues in a single iteration.- Since:
- Apr-2026
- Author:
- reed.vonredwitz
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationException(List<String> problems) Constructs aValidationExceptionwith the specified list of problems. -
Method Summary
Modifier and TypeMethodDescriptionproblems()Returns the list of problems detected during validation.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationException
Constructs aValidationExceptionwith the specified list of problems.- Parameters:
problems- the list of problem descriptions; must not be empty
-
-
Method Details
-
problems
-
getMessage
- Overrides:
getMessagein classThrowable
-