So I double checked and for the Spock integration, the failure report (the one taken with label "failure") is taken as soon as the exception happens and before any cleanup methods are called. The only cases where other code might be executed in-between the exception and the report being taken are:
- the failing feature method has a cleanup: block which will be executed before reporting
- an implementation of org.spockframework.runtime.IRunListener which has a non-empty implementation of error(ErrorInfo) method is registered with the spec before geb.spock.ReportingOnFailureExtension.visitSpec() which registers geb.spock.OnFailureReporter as a listener is executed
Basically, in most cases the failure report will be written as soon as the exception happens. Is this not what you are seeing, Ben?