listenErrorsInIsolate method

void listenErrorsInIsolate(
  1. Isolate context
)

Implementation

void listenErrorsInIsolate(isolate.Isolate context) {
  context.addErrorListener(
    isolate.RawReceivePort((pair) async {
      final List<dynamic> errorAndStacktrace = pair;
      await onRecordError(
        errorAndStacktrace.first,
        errorAndStacktrace.last,
        fatal: true,
      );
    }).sendPort,
  );
}