installErrorHandlers abstract method

Future<void> installErrorHandlers(
  1. FutureOr<void> action()
)

Installs global error handlers and runs action in a guarded zone to capture uncaught Dart errors.

Call this after start if you called start without an action and want to set up error handling. This should wrap the entire contents of your Dart main() function.

Example:

Future<void> main() async {
  await Embrace.instance.start();
  await Embrace.instance.installErrorHandlers(() => runApp(MyApp()));
}

Implementation

Future<void> installErrorHandlers(FutureOr<void> Function() action);