return new ExecutionFailureInfo(type, "[cyclic] " + throwable.getMessage(), null, ImmutableList.of(), ImmutableList.of(), null, GENERIC_INTERNAL_ERROR.toErrorCode(), remoteHost); return new ExecutionFailureInfo( type, throwable.getMessage(),
private ExecutionFailureInfo rewriteTransportFailure(ExecutionFailureInfo executionFailureInfo) { if (executionFailureInfo.getRemoteHost() == null || failureDetector.getState(executionFailureInfo.getRemoteHost()) != GONE) { return executionFailureInfo; } return new ExecutionFailureInfo( executionFailureInfo.getType(), executionFailureInfo.getMessage(), executionFailureInfo.getCause(), executionFailureInfo.getSuppressed(), executionFailureInfo.getStack(), executionFailureInfo.getErrorLocation(), REMOTE_HOST_GONE.toErrorCode(), executionFailureInfo.getRemoteHost()); }
public static ExecutionFailureInfo toFailure(Throwable failure) { if (failure == null) { return null; } // todo prevent looping with suppressed cause loops and such String type; if (failure instanceof Failure) { type = ((Failure) failure).getType(); } else { type = failure.getClass().getCanonicalName(); } return new ExecutionFailureInfo(type, failure.getMessage(), toFailure(failure.getCause()), toFailures(asList(failure.getSuppressed())), Lists.transform(asList(failure.getStackTrace()), toStringFunction()), getErrorLocation(failure), toErrorCode(failure)); }