Skip to content

Commit

Permalink
Change DaggerSuperficialValidation to throw rather than return a bool…
Browse files Browse the repository at this point in the history
…ean.

This CL changes DaggerSuperficialValidation to throw a ValidationException when resolution fails rather than returning a boolean.

This has a few benefits:

  1. It allows us to collect more information when validation fails by
     storing it in the exception.
  2. We already collect this information for "unexpected" exceptions during
     DaggerSuperficialValidation, so we can reuse that same exception for
     "expected" exceptions (i.e. those thrown by us).

Note that, currently, we don't do anything with the additional information contained in the ValidationException, but we'll eventually pass that information to XProcessing to give better error messages for the deferred elements.

RELNOTES=N/A
PiperOrigin-RevId: 416346969
  • Loading branch information
bcorso authored and Dagger Team committed Dec 14, 2021
1 parent 0ec8047 commit 3d683fe
Show file tree
Hide file tree
Showing 5 changed files with 853 additions and 161 deletions.

0 comments on commit 3d683fe

Please sign in to comment.