MDL-67189 external: Catch Throwable in call_external_function

This commit is contained in:
Dani Palou 2020-02-12 10:14:52 +01:00
parent 9df2f66fb4
commit 2603034e0a

View File

@ -252,7 +252,7 @@ class external_api {
$response['error'] = false;
$response['data'] = $result;
} catch (Exception $e) {
} catch (Throwable $e) {
$exception = get_exception_info($e);
unset($exception->a);
$exception->backtrace = format_backtrace($exception->backtrace, true);