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:
+2
-2
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user