#define REPLY_FAULT (   string,
(* fault_error ) = string; \
(* fault_code ) = code; \
return error; } while(0);

Perform an error reply inside a XML-RPC server stub implementation.

The macro fills the fault code and the fault string and then perform a function return using the error value provided. This error value will be ignored but it is necessary to allow the function to compile knowing that it must return something.

This macro must be used only while replying an error, as a invocation error of parameter failure. Its usual function could be the following example:

1 // ... server side XML-RPC service ...
2 if (/some errror found) {
3  // just call to the macro (without doing a return)
4  REPLY_FAULT ("Unable to complete XML-RPC service", -1, NULL);
5 }

This macro must not be confused with CREATE_FAULT_REPLY. The later is used to create a fault reply represented by a XmlRpcMethodResponse and it is usually used while building raw XML-RPC servers (without using the xml-rpc-gen tool).

stringThe fault string to be reported.
codeThe fault code to be reported.
errorThe error code to be returned by this function.