Chain exceptions in LdapUserBackend instead of printing the message

This commit is contained in:
Matthias Jentsch 2014-11-06 16:32:43 +01:00
parent 74e60ec0f6
commit d0706a55ea
1 changed files with 2 additions and 5 deletions

View File

@ -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
);