api / org.gradle.api.tasks / TaskState / getFailure

getFailure

abstract fun getFailure(): Throwable

Returns the exception describing the task failure, if any.

Return
The exception, or null if the task did not fail.