private static void collectCauseChain(Throwable exception, List<Throwable> collector) {
    if (exception == null) return;
    collector.add(exception);
    collectCauseChain(exception.getCause(), collector);
  }
Returns a list of all causes of the specified exception. The first element of the
returned list is the specified exception itself; the last element is its root cause.

@param exception an exception

@return the exception's cause chain
spock-core/src/main/java/spock/util/Exceptions.java