code: def _on_error(self, websock, e):
          '''
          Raises BrowsingException in the thread that created this instance.
          '''
          if isinstance(e, (
              websocket.WebSocketConnectionClosedException,
              ConnectionResetError)):
              self.logger.error('websocket closed, did chrome die?')
          else:
              self.logger.error(
                      'exception from websocket receiver thread',
                      exc_info=1)
          brozzler.thread_raise(self.calling_thread, BrowsingExceptionf _on_error(self, websock, e):
          '''
          Raises BrowsingException in the thread that created this instance.
          '''
          if isinstance(e, (
              websocket.WebSocketConnectionClosedException,
              ConnectionResetError)):
              self.logger.error('websocket closed, did chrome die?')
          else:
              self.logger.error(
                      'exception from websocket receiver thread',
                      exc_info=1)
          brozzler.thread_raise(self.calling_thread, BrowsingException)
docs: Raises BrowsingException in the thread that created this instance.