Skip to content

Allow Simple Injector to return the complete list of validation errors #1029

Description

@dotnetjunkie

When calling Container.Verify() only the first error is always returns. While this is fine for most scenario's, e.g. when the user forgot to register an interface, it is very useful to see all errors especially when the code is being refactored.

There are possible ways to do this:

  1. Add an Container.Verify(bool showAllErrors) overload
  2. Add a property to the exception thrown by Container.Verify() that contains the full list of errors, and append text to the exception message stating something like "You are only shown the first error. To see the full list of validation errors, please inspect the ValidationErrors property."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions