From 67b130983419e6cefc1b1349f9946b678f888381 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 12 Feb 2016 14:18:40 +0100 Subject: [PATCH] LdapDiscoveryPage: Show errors if they occur... --- modules/setup/application/forms/LdapDiscoveryPage.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/setup/application/forms/LdapDiscoveryPage.php b/modules/setup/application/forms/LdapDiscoveryPage.php index 9f4afcb66..15e8f4864 100644 --- a/modules/setup/application/forms/LdapDiscoveryPage.php +++ b/modules/setup/application/forms/LdapDiscoveryPage.php @@ -5,6 +5,7 @@ namespace Icinga\Module\Setup\Forms; use Exception; use Zend_Validate_NotEmpty; +use Icinga\Exception\IcingaException; use Icinga\Web\Form; use Icinga\Web\Form\ErrorLabeller; use Icinga\Forms\LdapDiscoveryForm; @@ -75,11 +76,12 @@ class LdapDiscoveryPage extends Form return true; } } catch (Exception $e) { + $this->error(sprintf( + $this->translate('Could not find any LDAP servers on the domain "%s". An error occurred: %s'), + $data['domain'], + IcingaException::describe($e) + )); } - - $this->error( - sprintf($this->translate('Could not find any LDAP servers on the domain "%s".'), $data['domain']) - ); } else { $labeller = new ErrorLabeller(array('element' => $this->getElement('domain'))); $this->getElement('domain')->addError($labeller->translate(Zend_Validate_NotEmpty::IS_EMPTY));