Chain exceptions in LdapUserBackend instead of printing the message
This commit is contained in:
parent
74e60ec0f6
commit
d0706a55ea
|
@ -72,10 +72,7 @@ class LdapUserBackend extends UserBackend
|
||||||
$q = $this->conn->select()->from($this->userClass);
|
$q = $this->conn->select()->from($this->userClass);
|
||||||
$result = $q->fetchRow();
|
$result = $q->fetchRow();
|
||||||
} catch (LdapException $e) {
|
} catch (LdapException $e) {
|
||||||
throw new AuthenticationException(
|
throw new AuthenticationException('Connection not possible.', $e);
|
||||||
'Connection not possible: %s',
|
|
||||||
$e->getMessage()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($result)) {
|
if (! isset($result)) {
|
||||||
|
@ -166,7 +163,7 @@ class LdapUserBackend extends UserBackend
|
||||||
} catch (AuthenticationException $e) {
|
} catch (AuthenticationException $e) {
|
||||||
// Authentication not possible
|
// Authentication not possible
|
||||||
throw new AuthenticationException(
|
throw new AuthenticationException(
|
||||||
'Authentication against backend "%s" not possible: %s',
|
'Authentication against backend "%s" not possible.',
|
||||||
$this->getName(),
|
$this->getName(),
|
||||||
$e
|
$e
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue