]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noresultexception.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / noresultexception.php
index d84785228263527b61877d9a7aa47df5b138192c..2933a351222c2eca4c10eedf7c6193f23241b7cf 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * StatusNet, the distributed open-source microblogging tool
  *
- * class for an exception when a database lookup returns no results
+ * Class for an exception when a database lookup returns no results
  *
  * PHP version 5
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Exception
- * @package   StatusNet
+ * @package   GNUsocial
  * @author    Mikael Nordfeldth <mmn@hethane.se>
  * @copyright 2013 Free Software Foundation, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
- * @link      http://status.net/
+ * @link      http://www.gnu.org/software/social/
  */
 
-if (!defined('GNUSOCIAL')) {
-    exit(1);
-}
-
-/**
- * Class for an exception when a local user is not found by certain criteria
- *
- * @category Exception
- * @package  StatusNet
- * @author   Mikael Nordfeldth <mmn@hethane.se>
- * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
- * @link     http://status.net/
- */
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 class NoResultException extends ServerException
 {
-    public function __construct(DB_DataObject $obj)
+    public $obj;    // The object with query that gave no results
+
+    public function __construct(Memcached_DataObject $obj)
     {
+        $this->obj = $obj;
         // We could log an entry here with the search parameters
-        parent::__construct(_('No result found on lookup.'));
+        parent::__construct(sprintf(_('No result found on %s lookup.'), get_class($obj)));
     }
 }