mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 06:14:25 +02:00
Show exception message when LDAP connection validation fails, if any
This commit is contained in:
parent
ba0154ab79
commit
4a982a382e
@ -119,12 +119,15 @@ class LdapResourceForm extends Form
|
|||||||
$form->getElement('bind_pw')->getValue()
|
$form->getElement('bind_pw')->getValue()
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new Exception();
|
throw new Exception(); // TODO: Get the exact error message
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$form->addError(
|
$msg = $form->translate('Connectivity validation failed, connection to the given resource not possible.');
|
||||||
$form->translate('Connectivity validation failed, connection to the given resource not possible.')
|
if (($error = $e->getMessage())) {
|
||||||
);
|
$msg .= ' (' . $error . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$form->addError($msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user