# File lib/jabber4r/protocol.rb, line 751
      def set_error(code,reason)
       @errorcode=code
       @error=reason
       @type="error"
       self
      end