class SimpleLdapException in Simple LDAP 8
Hierarchy
- class \Drupal\simple_ldap\SimpleLdapException extends \Drupal\simple_ldap\Exception
Expanded class hierarchy of SimpleLdapException
9 files declare their use of SimpleLdapException
- SimpleLdap.php in src/
SimpleLdap.php - SimpleLdapConnection.php in src/
SimpleLdapConnection.php - SimpleLdapConnectionInterface.php in src/
SimpleLdapConnectionInterface.php - SimpleLdapServerTest.php in tests/
src/ Unit/ SimpleLdapServerTest.php - Contains \Drupal\Tests\simple_ldap\Unit\SimpleLdapServer
- SimpleLdapTestBase.php in tests/
src/ Unit/ SimpleLdapTestBase.php - Contains \Drupal\Tests\simple_ldap\Unit\SimpleLdapTestBase
File
- src/
SimpleLdapException.php, line 5
Namespace
Drupal\simple_ldapView source
class SimpleLdapException extends \Exception {
/**
* Constructs a SimpleLdapException.
*/
public function __construct($message, $resource) {
if (is_resource($resource)) {
// Handle LDAP operation errors.
$error = ldap_errno($resource);
$message = $message . ldap_err2str($error);
parent::__construct($message, $error);
}
else {
// Handle exceptions that are not related to an LDAP resource link.
parent::__construct($message);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SimpleLdapException:: |
public | function | Constructs a SimpleLdapException. |