Class ValidationException

All Implemented Interfaces:
Serializable

public class ValidationException extends InjectionException
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 Details

    • ValidationException

      public ValidationException(List<String> problems)
      Constructs a ValidationException with the specified list of problems.
      Parameters:
      problems - the list of problem descriptions; must not be empty
  • Method Details

    • problems

      public List<String> problems()
      Returns the list of problems detected during validation.
      Returns:
      an unmodifiable list of problem descriptions
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable