onError method

void onError(
  1. Object exception
)

call onError when error

Implementation

void onError(final Object exception) {
  if (exception is Error || exception is Exception) {
    error = exception;
  }
}