mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
Merge branch 'MDL-58843-master-exchandler' of git://github.com/mudrd8mz/moodle
This commit is contained in:
commit
a5ea94d85f
@ -94,9 +94,9 @@ class service_exception_handler {
|
||||
/**
|
||||
* Echo an exception message encapsulated in XML.
|
||||
*
|
||||
* @param \Exception $exception The exception that was thrown
|
||||
* @param \Exception|\Throwable $exception The exception that was thrown
|
||||
*/
|
||||
public function handle(\Exception $exception) {
|
||||
public function handle($exception) {
|
||||
$message = $exception->getMessage();
|
||||
|
||||
// Add the exception backtrace for developers.
|
||||
|
@ -161,11 +161,11 @@ class webservice_xmlrpc_server extends webservice_base_server {
|
||||
/**
|
||||
* Generate the XML-RPC fault response.
|
||||
*
|
||||
* @param Exception $ex The exception.
|
||||
* @param Exception|Throwable $ex The exception.
|
||||
* @param int $faultcode The faultCode to be included in the fault response
|
||||
* @return string The XML-RPC fault response xml containing the faultCode and faultString.
|
||||
*/
|
||||
protected function generate_error(Exception $ex, $faultcode = 404) {
|
||||
protected function generate_error($ex, $faultcode = 404) {
|
||||
$error = $ex->getMessage();
|
||||
|
||||
if (!empty($ex->errorcode)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user