$this->zend_server->setReturnResponse(true);
//TODO: the error handling in Zend Soap server is useless, XML-RPC is much, much better :-(
$this->zend_server->registerFaultException('moodle_exception');
- $this->zend_server->registerFaultException('webservice_parameter_exception');
+ $this->zend_server->registerFaultException('webservice_parameter_exception'); //deprecated since Moodle 2.2 - kept for backward compatibility
$this->zend_server->registerFaultException('invalid_parameter_exception');
$this->zend_server->registerFaultException('invalid_response_exception');
+ //when DEBUG >= NORMAL then the thrown exceptions are "casted" into a PHP SoapFault expception
+ //in order to diplay the $debuginfo (see moodle_zend_soap_server class - MDL-29435)
+ if (debugging()) {
+ $this->zend_server->registerFaultException('SoapFault');
+ }
}
}