Class VerificationException
- All Implemented Interfaces:
Serializable, org.gradle.internal.exceptions.ResolutionProvider
A task can depend upon another task's outcome (PASS vs. FAIL), outputs (the files they produce) or both. A verification failure represents the case where a task has a failed outcome, but has still produced valid output files for consumption. Tasks that only depend on the other task's outputs are allowed to execute. Tasks that depend on both the outcome and output cannot execute.
These failures should be caused by user code under analysis (such as from running tests, code quality checks, or linting errors). A failed test, for instance, will cause a failing outcome for the test task, but this does not prevent another task from reading and processing the (valid) test results output it produced (perhaps to aggregate multiple test reports).
Verification failures do not represent a bug in either the build tool or custom task logic; the responsibility falls to the project's software engineer to correct the verification failure.
By default, a verification failure does not stop the build. Gradle keeps running the tasks that do not depend on the
outcome of the failed task, and the build fails once they have run. A task depends on the outcome of another task when
it declares a dependsOn relationship to it. A task that only uses the
outputs of the failed task as its inputs continues to run after a verification failure. Run the build with
--no-continue to stop at the first verification failure.
- Since:
- 7.4
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVerificationException(String message) Creates a newVerificationException.VerificationException(String message, Throwable cause) Allows a cause to be specified. -
Method Summary
Methods inherited from class GradleException
addResolution, clearResolutions, getResolutionsMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
VerificationException
-
VerificationException
Allows a cause to be specified.- Since:
- 8.2
-