From d0706a55ea303e3e287e764a5138f1342d4ba00e Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 6 Nov 2014 16:32:43 +0100 Subject: [PATCH] Chain exceptions in LdapUserBackend instead of printing the message --- library/Icinga/Authentication/Backend/LdapUserBackend.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/library/Icinga/Authentication/Backend/LdapUserBackend.php b/library/Icinga/Authentication/Backend/LdapUserBackend.php index 662200180..97ca24aa0 100644 --- a/library/Icinga/Authentication/Backend/LdapUserBackend.php +++ b/library/Icinga/Authentication/Backend/LdapUserBackend.php @@ -72,10 +72,7 @@ class LdapUserBackend extends UserBackend $q = $this->conn->select()->from($this->userClass); $result = $q->fetchRow(); } catch (LdapException $e) { - throw new AuthenticationException( - 'Connection not possible: %s', - $e->getMessage() - ); + throw new AuthenticationException('Connection not possible.', $e); } if (! isset($result)) { @@ -166,7 +163,7 @@ class LdapUserBackend extends UserBackend } catch (AuthenticationException $e) { // Authentication not possible throw new AuthenticationException( - 'Authentication against backend "%s" not possible: %s', + 'Authentication against backend "%s" not possible.', $this->getName(), $e );