cvs: pear /XML_Query2XML/XML/Query2XML/Driver LDAP2.php /XML_Query2XML/tests/XML_Query2XML/LDAP/getXML throwLDAPException_queryError.phpt

[email protected] ("Lukas Feiler")
Newsgroups php.pear.cvs
Message-ID <cvslukasfeiler1208604364@cvsserver>
lukasfeiler		Sat Apr 19 11:26:04 2008 UTC

  Modified files:              
    /pear/XML_Query2XML/XML/Query2XML/Driver	LDAP2.php 
    /pear/XML_Query2XML/tests/XML_Query2XML/LDAP/getXML	
                                                       	throwLDAPException_queryError.phpt 
  Log:
  exception for Net_LDAP2 driver is XML_Query2XML_LDAP2Exception
  
http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/XML/Query2XML/Driver/LDAP2.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/XML_Query2XML/XML/Query2XML/Driver/LDAP2.php
diff -u pear/XML_Query2XML/XML/Query2XML/Driver/LDAP2.php:1.1 pear/XML_Query2XML/XML/Query2XML/Driver/LDAP2.php:1.2
--- pear/XML_Query2XML/XML/Query2XML/Driver/LDAP2.php:1.1	Fri Apr 18 18:10:55 2008
+++ pear/XML_Query2XML/XML/Query2XML/Driver/LDAP2.php	Sat Apr 19 11:26:04 2008
@@ -9,7 +9,7 @@
  * @author    Lukas Feiler <[email protected]>
  * @copyright 2007 Lukas Feiler
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL Version 2.1
- * @version   CVS: $Id: LDAP2.php,v 1.1 2008/04/18 18:10:55 lukasfeiler Exp $
+ * @version   CVS: $Id: LDAP2.php,v 1.2 2008/04/19 11:26:04 lukasfeiler Exp $
  * @link      http://pear.php.net/package/XML_Query2XML
  * @access    private
  */
@@ -130,7 +130,7 @@
      * @param string $configPath The config path; used for exception messages.
      *
      * @return array An array of records.
-     * @throws XML_Query2XML_LDAPException If Net_LDAP2::search() returns an error.
+     * @throws XML_Query2XML_LDAP2Exception If Net_LDAP2::search() returns an error.
      * @see XML_Query2XML_Driver::getAllRecords()
      */
     public function getAllRecords($query, $configPath)
@@ -168,7 +168,7 @@
             /*
              * unit test: getXML/throwLDAPException_queryError.phpt
              */
-            throw new XML_Query2XML_LDAPException(
+            throw new XML_Query2XML_LDAP2Exception(
                 $configPath . ': Could not run LDAP search query: '
                 . $search->toString()
             );
@@ -344,7 +344,7 @@
  * @link     http://pear.php.net/package/XML_Query2XML
  * @access   private
  */
-class XML_Query2XML_LDAPException extends XML_Query2XML_DriverException
+class XML_Query2XML_LDAP2Exception extends XML_Query2XML_DriverException
 {
     /**
      * Constructor
http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/LDAP/getXML/throwLDAPException_queryError.phpt?r1=1.2&r2=1.3&diff_format=u
Index: pear/XML_Query2XML/tests/XML_Query2XML/LDAP/getXML/throwLDAPException_queryError.phpt
diff -u pear/XML_Query2XML/tests/XML_Query2XML/LDAP/getXML/throwLDAPException_queryError.phpt:1.2 pear/XML_Query2XML/tests/XML_Query2XML/LDAP/getXML/throwLDAPException_queryError.phpt:1.3
--- pear/XML_Query2XML/tests/XML_Query2XML/LDAP/getXML/throwLDAPException_queryError.phpt:1.2	Fri Apr 18 23:52:52 2008
+++ pear/XML_Query2XML/tests/XML_Query2XML/LDAP/getXML/throwLDAPException_queryError.phpt	Sat Apr 19 11:26:04 2008
@@ -28,7 +28,9 @@
         $dom->formatOutput = true;
         print $dom->saveXML();
     } catch (XML_Query2XML_LDAPException $e) {
-        echo get_class($e) . ': ' . str_replace('net_ldap2_error', 'net_ldap_error', $e->getMessage());
+        echo get_class($e) . ': ' . $e->getMessage();
+    } catch (XML_Query2XML_LDAP2Exception $e) {
+        echo str_replace('LDAP2', 'LDAP', get_class($e)) . ': ' . str_replace('net_ldap2_error', 'net_ldap_error', $e->getMessage());
     }
 ?>
 --EXPECT--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.