call method

  1. @override
Future<void> call(
  1. Hub hub,
  2. SentryOptions options
)
override

A Callable method for the Integration interface

Implementation

@override
Future<void> call(Hub hub, SentryOptions options) {
  final completer = Completer<void>();

  SentryRunZonedGuarded.sentryRunZonedGuarded(hub, () async {
    try {
      await _runner();
    } finally {
      completer.complete();
    }
  }, _onError);

  options.sdk.addIntegration('runZonedGuardedIntegration');

  return completer.future;
}