On Sun, 2008-03-02 at 17:38 +1100, Brad Hards wrote: > I'm doing a bit of api documentation work, and I've come up with a query. > > If a parameter is not NULL, but is still not correctly set up, should it > return MAPI_E_INVALID_PARAMETER? > > This comes up in set_SPropTagArray(), as shown below. Is the last > change in the patch (return MAPI_E_INVALID_PARAMETER, rather than > MAPI_E_NOT_INITIALIZED) correct?
Correct.
The general policy for errors with function's parameters is to return
MAPI_E_INVALID_PARAMETER when they are not set properly, except for "API
container struct" which should return MAPI_E_NOT_INITIALIZED if
developer missed the *_init functions (e.g: mapi_nameid struct).
IIRC, Dan Shearer discussed a DEBUG api on the list some months ago and
proposed to introduce OC_MAPI_{E,W}_* errors values, so we do not
overlap with real MAPI errors.
The other possibility would be to add a GetLastErrorMsg() function
(using a global const char *error_msg), so we can provide additional
information to the generic MAPI_E_INVALID_PARAMETER error code.
Brad: Shall I apply the patch as submitted in previous mail?
Cheers,
Julien.
--
Julien Kerihuel
[EMAIL PROTECTED]
OpenChange Project Manager
GPG Fingerprint: 0B55 783D A781 6329 108A B609 7EF6 FE11 A35F 1F79
signature.asc
Description: This is a digitally signed message part
_______________________________________________ devel mailing list [email protected] http://mailman.openchange.org/listinfo/devel
