MPS issue job003343

TitleDocumentation could say more about meaning of result codes
Assigned userRichard Brooksby
DescriptionThe reference manual entry for mps_res_t [1] says, "see the documentation of the function" for the meaning of MPS_RES_FAIL, but in fact very few functions list possible result codes that might be returned by a function or what they mean. (Usually the description is something like, "MPS_RES_OK if successful, some other result code otherwise.")

I wrote an explanation for this: "The modular nature of the MPS means that it is not usually possible for a function description to list the possible error codes that it might return. A function in the public interface typically calls methods of an arena class and one or more pool classes, any of which might fail. The MPS is extensible with new arena and pool classes, which might fail in new and interesting ways, so the only future-proof behaviour is for a client program to assume that any MPS function that returns a result code can return any result code."

However, RB thinks there may be cases where we could in fact say a bit more about the meaning of some of the result codes returned by some of the functions.
AnalysisThis would require a lot of inspection, and I think the value is quite low. Wash your dog before doing this.

GDR 2013-05-16: job003485 has another proposal for improving error handling.
How foundinspection
Evidence[1] <>
Observed in1.110.0
Created byGareth Rees
Created on2012-10-24 15:37:01
Last modified byGareth Rees
Last modified on2018-06-26 09:12:40
History2012-10-24 GDR Created.


Change Effect Date User Description
180049 closed 2012-10-24 12:26:07 Gareth Rees Write error chapter.