VerificationException (Gradle API 9.6.1)
Description: declaration: package: org.gradle.api.tasks, class: VerificationException

Package org.gradle.api.tasks

# Class VerificationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.gradle.api.GradleException
org.gradle.api.tasks.VerificationException

All Implemented Interfaces:
  `Serializable`

public class VerificationException extends GradleException
Signals that a task has failed in a manner which does not prevent consumers of that task's output from running. 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.

Since:
  7.4
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VerificationException(String message)`
  `VerificationException(String message, Throwable cause)`
  Allows a cause to be specified.

- ## Method Summary

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### VerificationException

    public VerificationException(String message)

  - ### VerificationException

    @Incubating public VerificationException(String message, Throwable cause)
    Allows a cause to be specified.
    Since:
      8.2