You are here

class SimpleLdapException in Simple LDAP 7

Same name and namespace in other branches
  1. 7.2 SimpleLdapException.class.php \SimpleLdapException

@file Class to handle Simple LDAP exceptions.

Hierarchy

Expanded class hierarchy of SimpleLdapException

File

./SimpleLdapException.class.php, line 7
Class to handle Simple LDAP exceptions.

View source
class SimpleLdapException extends Exception {

  /**
   * Inherited __construct().
   */
  public function __construct($resource) {
    if (is_resource($resource)) {

      // Handle LDAP operation errors.
      $error = ldap_errno($resource);
      $message = ldap_err2str($error);
      parent::__construct($message, $error);
    }
    else {

      // Handle exceptions that are not related to an LDAP resource link.
      parent::__construct($resource);
    }

    // Log the exception.
    watchdog_exception('simple_ldap', $this);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SimpleLdapException::__construct public function Inherited __construct().