}
else if (failure instanceof Failure) {
errorCode = ((Failure) failure).getErrorCode();
}
return new ExecutionFailureInfo(type,
failure.getMessage(),
toFailure(failure.getCause()),
toFailures(asList(failure.getSuppressed())),
Lists.transform(asList(failure.getStackTrace()), toStringFunction()),
getErrorLocation(failure),