handleAsync<R> method

  1. @override
Future<R> handleAsync<R>(
  1. Future<R> operation()
)
override

Implementation

@override
Future<R> handleAsync<R>(Future<R> Function() operation) async {
  try {
    return await operation();
  } catch (e) {
    if (e is Exception) {
      addError(e);
    } else {
      addError(Exception(e.toString()));
    }
    rethrow;
  } finally {
    update();
  }
}