Reports a failed pending checkpoint.

@param failureTimestamp Timestamp of the failure.
@param cause Optional cause of the failure.
332968
void reportFailedCheckpoint(long failureTimestamp, @Nullable Throwable cause) {
		FailedCheckpointStats failed = new FailedCheckpointStats(
			checkpointId,
			triggerTimestamp,
			props,
			numberOfSubtasks,
			new HashMap<>(taskStats),
			currentNumAcknowledgedSubtasks,
			currentStateSize,
			currentAlignmentBuffered,
			failureTimestamp,
			latestAcknowledgedSubtask,
			cause);

		trackerCallback.reportFailedCheckpoint(failed);
	}
428613
void reportError(Throwable throwable) {
    if (logger != null)
      logger.error("Timer reported error", throwable);
    status = "Thread blocked on error: " + throwable;
    error_skips = error_factor;
  }
1057863
public void fail(Throwable t) {
    if (!failed) {
      if (doneHandler != null) {
        doneHandler.handle(new DefaultFutureResult<T>(t));
      } else {
        cause = t;
      }
      failed = true;
    }
  }
1137492
protected void recordFailureMetrics(PolicyFailure failure) {
        requestMetric.setResponseCode(failure.getResponseCode());
        requestMetric.setFailure(true);
        requestMetric.setFailureCode(failure.getFailureCode());
        requestMetric.setFailureReason(failure.getMessage());
    }
826858
@Nullable
    public static <T> T log(Throwable cause) {
        logger.warn("Unexpected exception from a completion action:", cause);
        return null;
    }
1369120
public void abort(CheckpointFailureReason reason, Throwable cause) {
		try {
			CheckpointException exception = new CheckpointException(reason, cause);
			onCompletionPromise.completeExceptionally(exception);
			reportFailedCheckpoint(exception);
			assertAbortSubsumedForced(reason);
		} finally {
			dispose(true);
		}
	}
1012694
public void logTaskFailed(TaskID taskId, String taskType, long time,
                            String error,
                            TaskAttemptID failedDueToAttempt) {
    if (disableHistory) {
      return;
    }

    JobID id = taskId.getJobID();
    if (!this.jobId.equals(id)) {
      throw new RuntimeException("JobId from task: " + id +
                                 " does not match expected: " + jobId);
    }

    if (null != writers) {
      String failedAttempt = failedDueToAttempt == null ?
          "" :
          failedDueToAttempt.toString();
      log(writers, RecordTypes.Task,
          new Keys[]{Keys.TASKID, Keys.TASK_TYPE,
                     Keys.TASK_STATUS, Keys.FINISH_TIME,
                     Keys.ERROR, Keys.TASK_ATTEMPT_ID},
          new String[]{ taskId.toString(),  taskType,
                        Values.FAILED.name(),
                        String.valueOf(time) , error,
                        failedAttempt});
    }
  }
1358043
private void fireConnectionClosedOnError(
            final Throwable cause) {
        assertUnlocked();

        BOSHClientConnEvent event = null;
        for (BOSHClientConnListener listener : connListeners) {
            if (event == null) {
                event = BOSHClientConnEvent
                        .createConnectionClosedOnErrorEvent(
                        this, pendingRequestAcks, cause);
            }
            try {
                listener.connectionEvent(event);
            } catch (Exception ex) {
                LOG.log(Level.WARNING, UNHANDLED, ex);
            }
        }
    }
1133744
public void onFailure(Throwable t) {

        if ((t instanceof StatusCodeException) && (((StatusCodeException)t).getStatusCode() == 0)) {
            // a status code 0 indicates the client aborted the request, most likely when leaving the page, this should be ignored
            return;
        } else if ((t instanceof StatusCodeException) && (((StatusCodeException)t).getStatusCode() == 500)) {
            // a server error 500 most likely indicates an expired session and there for insufficient user rights to access any GWT service
            CmsErrorDialog dialog = new CmsErrorDialog(Messages.get().key(Messages.GUI_SESSION_EXPIRED_0), null);
            dialog.center();
        } else {
            CmsErrorDialog.handleException(t);
        }
        // remove the overlay
        stop(false);
    }
106322
private void failTask(Throwable cause)
    {
        TaskStatus taskStatus = getTaskStatus();
        if (!taskStatus.getState().isDone()) {
            log.debug(cause, "Remote task %s failed with %s", taskStatus.getSelf(), cause);
        }

        abort(failWith(getTaskStatus(), FAILED, ImmutableList.of(toFailure(cause))));
    }
538140
public void onFailure (Throwable cause)
    {
        Console.log("Callback failure", "for", _trigger, cause);
        setEnabled(true);
        reportFailure(cause);
    }
481605
public void abortPendingCheckpoints(CheckpointException exception) {
		synchronized (lock) {
			for (PendingCheckpoint p : pendingCheckpoints.values()) {
				p.abort(exception.getCheckpointFailureReason());
			}

			pendingCheckpoints.clear();
		}
	}
24187
public static void notifyFailed(PingCallback callback, Executor executor, Throwable cause) {
    doExecute(executor, asRunnable(callback, cause));
  }
1233499
public void removeAndFail(Throwable cause) {
        assert ctx.executor().inEventLoop();
        if (cause == null) {
            throw new NullPointerException("cause");
        }
        PendingWrite write = head;

        if (write == null) {
            return;
        }
        ReferenceCountUtil.safeRelease(write.msg);
        ChannelPromise promise = write.promise;
        safeFail(promise, cause);
        recycle(write, true);
    }
1039842
private void failOutstandingRequests(Throwable cause) {
    for (Map.Entry<StreamChunkId, ChunkReceivedCallback> entry : outstandingFetches.entrySet()) {
      try {
        entry.getValue().onFailure(entry.getKey().chunkIndex, cause);
      } catch (Exception e) {
        logger.warn("ChunkReceivedCallback.onFailure throws exception", e);
      }
    }
    for (Map.Entry<Long, RpcResponseCallback> entry : outstandingRpcs.entrySet()) {
      try {
        entry.getValue().onFailure(cause);
      } catch (Exception e) {
        logger.warn("RpcResponseCallback.onFailure throws exception", e);
      }
    }
    for (Pair<String, StreamCallback> entry : streamCallbacks) {
      try {
        entry.getValue().onFailure(entry.getKey(), cause);
      } catch (Exception e) {
        logger.warn("StreamCallback.onFailure throws exception", e);
      }
    }

    // It's OK if new fetches appear, as they will fail immediately.
    outstandingFetches.clear();
    outstandingRpcs.clear();
    streamCallbacks.clear();
  }
1118825
public static TimeoutException newTimeoutException(String message, java.util.concurrent.TimeoutException cause) {
        return new TimeoutException(message, cause);
    }
1188862
public static TimeoutException newTimeoutException(long timeout, TimeUnit unit, java.util.concurrent.TimeoutException cause) {
        return new TimeoutException(timeout, unit, cause);
    }