Commit 857bef23 authored by Nigel McNie's avatar Nigel McNie
Browse files

Throw some slightly better exceptions if config data cannot be obtained.

parent 312b8b46
......@@ -487,12 +487,12 @@ class PluginAuthXmlrpc extends PluginAuth {
if ($instance > 0) {
$default = get_record('auth_instance', 'id', $instance);
if ($default == false) {
throw new Exception(get_string('nodataforinstance', 'auth').$instance);
throw new SystemException(get_string('nodataforinstance', 'auth').$instance);
}
$current_config = get_records_menu('auth_instance_config', 'instance', $instance, '', 'field, value');
if ($current_config == false) {
throw new Exception('No config data for instance: '.$instance);
throw new SystemException('No config data for instance: '.$instance);
}
foreach (self::$default_config as $key => $value) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment