MDL-78917 webservice: extra data in exception for missing classpath.

Include the external function classname & methodname properties in
the thrown exception, to aid diagnostic.
This commit is contained in:
Paul Holden
2023-09-04 09:03:32 +01:00
parent 60810e78fb
commit ed818157bb
+2 -2
View File
@@ -84,8 +84,8 @@ class external_api {
$function->classpath = $CFG->dirroot.'/'.$function->classpath;
}
if (!file_exists($function->classpath)) {
throw new coding_exception('Cannot find file ' . $function->classpath .
' with external function implementation');
throw new coding_exception("Cannot find file {$function->classpath} with external function implementation " .
"for {$function->classname}::{$function->methodname}");
}
require_once($function->classpath);
if (!class_exists($function->classname)) {