I think we should start using additional error values. One way to do
it would be to have an array of additional attributes stored in the
usage exception object , and an optional constructor parameter to set
it. Alternatively we could have multiple derived exception objects,
but i think it would be an overkill.
On Nov 21, 2007 2:13 PM, Roan Kattouw <roan.kattouw(a)home.nl> wrote:
Carl Beckhorn schreef:
I looked at the API code this afternoon to see if
I could add another
field to the error object that would directly include the lag, so that
I don't have to parse it out of the text of the info field. I dicovered
that the error objects at the moment can only have two fields, 'code'
and 'info'.
Since the 'info' parameter is always formatted the
same for code=maxlag,
parsing it shouldn't be too hard. The documentation [1] should document
all possible errors, like the docs for the suggested APIedit modules do
(example [2]).
Roan Kattouw (Catrope)
[1]
http://www.mediawiki.org/wiki/API
[2]
http://www.mediawiki.org/wiki/API:Edit_-_Move#Possible_errors
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api