$params['user'],
$e->getMessage()));
}
+ if ($uid === false) {
+ throw new Horde_Kolab_Server_MissingObjectException(sprintf(_("Failed identifying the UID of the Kolab user %s."),
+ $params['user']));
+ }
$params['uid'] = $uid;
}
$server_params = array_merge($server_params, $params);
--- /dev/null
+<?php
+/**
+ * A library for accessing the Kolab user database.
+ *
+ * PHP version 5
+ *
+ * @category Kolab
+ * @package Kolab_Server
+ * @author Gunnar Wrobel <wrobel@pardus.de>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Kolab_Server
+ */
+
+/**
+ * This class provides an exception that indicates a non-existing object.
+ *
+ * Copyright 2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Kolab
+ * @package Kolab_Server
+ * @author Gunnar Wrobel <wrobel@pardus.de>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Kolab_Server
+ */
+class Horde_Kolab_Server_MissingObjectException extends Horde_Kolab_Server_Exception
+{
+}
+++ /dev/null
-<?php
-/**
- * A library for accessing the Kolab user database.
- *
- * PHP version 5
- *
- * @category Kolab
- * @package Kolab_Server
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_Server
- */
-
-/**
- * This class provides an exception that indicates a non-existing object.
- *
- * Copyright 2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Kolab
- * @package Kolab_Server
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_Server
- */
-class Horde_Kolab_Server_ObjectMissing extends Exception
-{
-}
}
if (!isset($this->_data[$dn])) {
- throw new Horde_Kolab_Server_Exception(sprintf("LDAP Error: No such object: %s: No such object",
- $dn));
+ throw new Horde_Kolab_Server_MissingObjectException(sprintf("No such object: %s",
+ $dn));
}
if (empty($attrs)) {
return $this->_data[$dn]['data'];
<file name="Exception.php" role="php" />
<file name="file.php" role="php" />
<file name="ldap.php" role="php" />
+ <file name="MissingObjectException.php" role="php" />
<file name="Object.php" role="php" />
<file name="test.php" role="php" />
<dir name="Object">
<install name="lib/Horde/Kolab/Server/Exception.php" as="Horde/Kolab/Server/Exception.php" />
<install name="lib/Horde/Kolab/Server/file.php" as="Horde/Kolab/Server/file.php" />
<install name="lib/Horde/Kolab/Server/ldap.php" as="Horde/Kolab/Server/ldap.php" />
+ <install name="lib/Horde/Kolab/Server/MissingObjectException.php" as="Horde/Kolab/Server/MissingObjectException.php" />
<install name="lib/Horde/Kolab/Server/test.php" as="Horde/Kolab/Server/test.php" />
<install name="lib/Horde/Kolab/Server/Object.php" as="Horde/Kolab/Server/Object.php" />
<install name="lib/Horde/Kolab/Server/Object/address.php" as="Horde/Kolab/Server/Object/address.php" />