Add more information.
authorJan Schneider <jan@horde.org>
Thu, 20 May 2010 17:27:10 +0000 (19:27 +0200)
committerJan Schneider <jan@horde.org>
Thu, 20 May 2010 17:29:35 +0000 (19:29 +0200)
framework/Db/lib/Horde/Db/Adapter/Base.php

index bd65cdb..76aec92 100644 (file)
@@ -245,7 +245,13 @@ abstract class Horde_Db_Adapter_Base
             return call_user_func_array(array($this->_schema, $method), $args);
         }
 
-        throw new BadMethodCallException('Call to undeclared method "' . get_class($this) . '::' . $method . '"');
+        $support = new Horde_Support_Backtrace();
+        $context = $support->getContext(2);
+        $caller = $context['function'];
+        if (isset($context['class'])) {
+            $caller = $context['class'] . '::' . $caller;
+        }
+        throw new BadMethodCallException('Call to undeclared method "' . get_class($this) . '::' . $method . '" from "' . $caller . '"');
     }