As part of me trying to understand the store protocol so I can help create the ruby binding Alex and i have had a chat about the current error code solution within Bongo.

here is a copy of the IRC log as it happened.

[09:40] <LanceHaig> also If I want to go through all the c code and make our error codes sequential will that be difficult?
[09:40] <LanceHaig> for a non C programmer?
[09:41] <so_solid_moo> virtually impossible, for anyone
[09:41] <so_solid_moo> I'm not against updating our error codes, but due to the way code gets shared in the store, various commands will issue the same error response [09:42] <so_solid_moo> because it's coming from the same underlying bit of code
[09:42] <LanceHaig> right
[09:42] <LanceHaig> ok
[09:43] <so_solid_moo> I think probably what we'd want to do is group them more strongly [09:43] <so_solid_moo> they're sort-of HTTPish, in that e.g. any 4xxx code is a security issue
[09:43] <so_solid_moo> and any 5xxx is an internal error
[09:43] <LanceHaig> It is just easier to react and capture codes in my opinion
[09:44] <LanceHaig> those would be easier I think
[09:44] <LanceHaig> I will make the binding be more contextual when interpreting codes
[09:48] <so_solid_moo> this is something we could discuss on -devel
[09:48] <so_solid_moo> I'm a bit aware that our current error code scheme is less than useful [09:49] <so_solid_moo> what I'm thinking is that maybe we'd change the codes to EEII format [09:49] <so_solid_moo> where bindings care about the EE bit, but not the II bit [09:49] <so_solid_moo> so 2001, 2002, .. 2099 are all the same error code as far as they are concerned
[09:49] <so_solid_moo> (as an example)
[10:55] <LanceHaig> right I can se that
[10:56] <LanceHaig> Will still need tounderstand :-) but that is me

Apart from my poor spelling as always i wanted to take Alex's advice and bring this discussion to the list.

My take on this has come about since Baris and I have been working on the ruby binding.

I started creating some error classes so that we could act on those should they occur. in reading through the store protocol document I noticed that there are some error codes that overlap e.g. 4226 which means something different depending on what the context it is received in.

I would prefer that we have sequential numbers so that it is easier to listen for the code and then do some stuff to either notify someone or fix it.

Alex then explained as you can read above that the current code would make it really difficult to accomplish an individual error code per error as so much of it is reused in other parts of the store code.

He has made a suggestion above which I am sure he wil expand on here that could make things clearer which I support.

How do people feel about the current scenario and the suggestions that Alex has made?

Regards

Lance


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Bongo-devel mailing list
[email protected]
https://mail.gna.org/listinfo/bongo-devel

Reply via email to