[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [JDEV] Error messages (was: jabber.transport dropping connection..)



> Right now the approach is to actually send a <message/> with
> <ext>error</ext>.  I've gone back and forth with myself about this a few
> times, and am really sitting on the fence.

	Actually, is the <something type='something'> context still valid using
expat?  Aka, would this:

  <message type='error'>
  	<to>jeremie</to>
  	<say>Your password did NOT match your user ID</say>
      <ext>FailedValidation</ext>
  </message>

	still be valid?  It IS valid XML, but I wasn't absolutly sure HOW 100%
expat IS.  Looks to me like it can.  This way we can easily usethe message
tag for all messages going to/from clients, but still be able to specify a
message 'type'.  If no type is specified, we assume it's a normal message.
Clients who do not intercept errors would merely pass this along as a
message, but it would give the clients the ability to optionally catch
different message 'types' themselves..

> On one hand, I like having errors be special messages that clients can
> *optionally* intercept, or just deliver them.  This is just one less thing
> that a client would be _required_ to deal with and one less, and one less
> thing the server and transports have to handle.  Basically, if you
> consider "messages" to be your primary communication channel(like email)
> then errors would just be delivered via that channel.

	See above.. ;-P  I think it addresses it, and allows for both..

> On the other hand, it's really tempting to add to the protocol and create
> a nice clean way of communicating errors.

	Which is why we predefine a list 'message types' that are recomended to be
supported within clients, such as 'error'.  Nice, clean, and requires no
additional changes to the protocol..

> I think I'm still of the attitude that if we can utilize the existing
> protocol to do this *and* add the feature of allowing clients to be
> simplier if they want to be, than using messages to communicate errors is
> better.

	Done..  Next!! Number 93.. Number 93..  (As in, take a number from the
pretty red number giver outer..)

--
Thomas Charron
United Parcel Service
Northeast Region
"Moving at the speed of a T3 Trunk Line!"