private void setException(Exception e, String message) {
      if (!(e instanceof ReplicationException)) {
        replicationMetrics.incrementReplicationErrorCount(replicatingFromRemoteColo, datacenterName);
      }
      if (e instanceof ReplicationException
          && ((ReplicationException) e).getServerErrorCode() == ServerErrorCode.RetryAfterBackoff) {
        replicationMetrics.incrementRetryAfterBackoffErrorCount(replicatingFromRemoteColo, datacenterName);
        logger.trace("Remote node: {} Thread name: {} RemoteReplicaGroup {} {}", remoteDataNode, threadName, id,
            message);
      } else {
        logger.error("Remote node: {} Thread name: {} RemoteReplicaGroup {} {}", remoteDataNode, threadName, id,
            message, e);
      }
      exception = e;
      state = ReplicaGroupReplicationState.DONE;
    }
Set exception for the group and change the state to DONE and log the message out.
@param e The exception to set
@param message The message to log out
ambry-replication/src/main/java/com/github/ambry/replication/ReplicaThread.java