Error Message Format for SharePoint Foundation
Last modified: March 23, 2010
Applies to: SharePoint Foundation 2010
Methods for SharePoint Foundation return error messages using the following syntax.
<Results> <Result ID="0,method-name" Code="HRESULT code"> <ErrorText>Description of failure</ErrorText> </Result> </Results>
The ID attribute displays the name of the method that generated the error, preceded by its sequence number. The Code attribute contains the text representation of a 32-bit signed decimal integer, to be interpreted as an HRESULT, as shown in the following example.
<Results> <Result ID="0,REORDERFIELDS" Code="-2147467259"> <ErrorText>Fields have been added or removed since you began this editing session. Please refresh your view and try again. </ErrorText> </Result> </Results>
In the preceding example, the error number -2147467259 (0x80004005 in hexadecimal) identifies the error E_FAIL.
The language of the error text is based upon the language setting for the server, not for the client.