From 17dae8a03666a152fd4fe1fab443bf2681b9c53a Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 31 Aug 2023 14:15:17 +0100 Subject: [PATCH] MDL-78917 webservice: extra data in exception for missing classpath. Include the external function classname & methodname properties in the thrown exception, to aid diagnostic. --- lib/external/classes/external_api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/external/classes/external_api.php b/lib/external/classes/external_api.php index c770a80ab71..2bb29c7e42f 100644 --- a/lib/external/classes/external_api.php +++ b/lib/external/classes/external_api.php @@ -67,7 +67,8 @@ class external_api { } if (!file_exists($function->classpath)) { throw new coding_exception( - "Cannot find file {$function->classpath} with external function implementation" + "Cannot find file {$function->classpath} with external function implementation " . + "for {$function->classname}::{$function->methodname}" ); } require_once($function->classpath);