code: def _BreakpointEvent(self, event, frame):
      
      error_status = None
  
      if event != native.BREAKPOINT_EVENT_HIT:
        error_status = _BREAKPOINT_EVENT_STATUS[event]
      elif self.definition.get('action') == 'LOG':
        error_status = self._collector.Log(frame)
        if not error_status:
          return  # Log action successful, no need to clear the breakpoint.
  
      # Let only one thread capture the data and complete the breakpoint.
      if not self._SetCompleted():
        return
  
      self.Clear()
  
      if error_status:
        self._CompleteBreakpoint({'status': error_status})
        return
  
      collector = capture_collector.CaptureCollector(
          self.definition, self.data_visibility_policy)
  
      # TODO(b/69119299): This is a temporary try/except. All exceptions should be
      # caught inside Collect and converted into breakpoint error messages.
      try:
        collector.Collect(frame)
      except BaseException as e:  # pylint: disable=broad-except
        native.LogInfo('Internal error during data capture: %s' % repr(e))
        error_status = {'isError': True,
                        'description': {
                            'format': ('Internal error while capturing data: %s' %
                                       repr(e))}}
        self._CompleteBreakpoint({'status': error_status})
        return
      except:  # pylint: disable=bare-except
        native.LogInfo('Unknown exception raised')
        error_status = {'isError': True,
                        'description': {
                            'format': 'Unknown internal error'}}
        self._CompleteBreakpoint({'status': error_status})
        return
  
      self._CompleteBreakpoint(collector.breakpoint, is_incremental=False)
docs: Callback invoked by cdbg_native when breakpoint hits.
  
      Args:
        event: breakpoint event (see kIntegerConstants in native_module.cc).
        frame: Python stack frame of breakpoint hit or None for other events.