At the least, it should throw exceptions, which are caught by the error handler and used to send back a properly formatted xmlrpc response.
Eg: mnet code does something like
throw new mnet_exception(1234, get_string('blah', 'mnet')); // where 'blah' might be 'Your identity provider is not providing us enough information for your account to be created'
and the default error handler, does something like if (defined('XMLRPC_MNET'))
{ xmlrpc_server_fault($e->getCode(), $e->getMessage()); }Will link in related bugs.