anchor.diff:      return result != null ? result : new Future.value(null);
     }
   
  +  void _tryHandleEvent(int event) {
  +    // This callback is running in the handler for a RawReceivePort. All
  +    // exceptions rethrown or not caught here will be unhandled exceptions in
  +    // the root zone, bringing down the whole app. An app should rather have an
  +    // opportunity to handle exceptions coming from Mojo, like the
  +    // MojoCodecError.
  +    // TODO(zra): Rather than hard-coding a list of exceptions that bypass the
  +    // onError callback and are rethrown, investigate allowing an implementer to
  +    // provide a filter function (possibly initialized with a sensible default).
  +    try {
  +      _handleEvent(event);
  +    } on Error catch (_) {
  +      // An Error exception from the core libraries is probably a programming
  +      // error that can't be handled. We rethrow the error so that
  +      // MojoEventHandlers can't swallow it by mistake.
  +      rethrow;
  +    } catch (e) {
  +      close(immediate: true).then((_) {
  +        if (onError != null) {
  +          onError(e);
  +        }
  +      });
  +    }
  +  }
  +
     void _handleEvent(int signalsReceived) {
       if (!_isOpen) {
         // The actual close of the underlying stream happens asynchronously
  
positive.code:     }
    }
  
    void handleRead() {}
    void handleWrite() {}
  
    MojoMessagePipeEndpoint get endpoint => _endpoint;
  
negative.code:       throw new MojoApiError("MojoEventHandler is unbound.");
      }
      _isOpen = true;
      _eventSubscription.subscribe(_tryHandleEvent);
    }
  
    Future close({bool immediate: false}) {
  