code: def set_error(scope, error_re=None):
      
      conn = scope.get('__connection__')
      conn.set_error_prompt(error_re)
      return True
docs: Defines a pattern that, whenever detected in the response of the remote
      host, causes an error to be raised.
  
      In other words, whenever Exscript waits for a prompt, it searches the
      response of the host for the given pattern and raises an error if the
      pattern is found.
  
      :type  error_re: regex
      :param error_re: The error pattern.