restartTask method

  1. @mustCallSuper
void restartTask(
  1. Task task
)

Implementation

@mustCallSuper
void restartTask(Task task) async {
  try {
    task.preRestart();
  } catch (e) {
    task.postError(e);
    return;
  }

  try {
    task.postReceive(await task.createTask());
  } catch (error) {
    task.postError(error);
    return;
  }

  try {
    task.postRestart();
  } catch (e) {
    task.postError(e);
    return;
  }
}