More appropriate exception
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 07:28:27 +0000 (01:28 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 07:28:27 +0000 (01:28 -0600)
imp/lib/Imap.php

index bcdbdd8..b42b93c 100644 (file)
@@ -398,12 +398,12 @@ class IMP_Imap
      * @param array $params   Method Parameters.
      *
      * @return mixed  The return from the requested method.
-     * @throws IMP_Exception
+     * @throws BadMethodCallException
      */
     public function __call($method, $params)
     {
         if (!$this->ob || !method_exists($this->ob, $method)) {
-            throw new IMP_Exception(sprintf('%s: Invalid method call "%s".', __CLASS__, $method));
+            throw new BadMethodCallException(sprintf('%s: Invalid method call "%s".', __CLASS__, $method));
         }
 
         return call_user_func_array(array($this->ob, $method), $params);