presto-main/src/main/java/io/prestosql/execution/TaskStatus.java/TaskStatus/failWith
class TaskStatus:    public static TaskStatus failWith(TaskStatus taskStatus, TaskState state, List<ExecutionFailureInfo> exceptions)
    {
        return new TaskStatus(
                taskStatus.getTaskId(),
                taskStatus.getTaskInstanceId(),
                MAX_VERSION,
                state,
                taskStatus.getSelf(),
                taskStatus.getNodeId(),
                taskStatus.getCompletedDriverGroups(),
                exceptions,
                taskStatus.getQueuedPartitionedDrivers(),
                taskStatus.getRunningPartitionedDrivers(),
                taskStatus.isOutputBufferOverutilized(),
                taskStatus.getPhysicalWrittenDataSize(),
                taskStatus.getMemoryReservation(),
                taskStatus.getSystemMemoryReservation(),
                taskStatus.getRevocableMemoryReservation(),
                taskStatus.getFullGcCount(),
                taskStatus.getFullGcTime());
    }