code: def handleError(self, error_code, message):
          '''Log and set the controller state.'''
          self._fail = True
          self.reason = error_code
          self._error = messagf handleError(self, error_code, message):
          '''Log and set the controller state.'''
          self._fail = True
          self.reason = error_code
          self._error = message
docs: Log and set the controller state.