From 50eba5d487269d44d2ec3764ad0e3a11f18e583b Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 20 May 2010 19:27:10 +0200 Subject: [PATCH] Add more information. --- framework/Db/lib/Horde/Db/Adapter/Base.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/framework/Db/lib/Horde/Db/Adapter/Base.php b/framework/Db/lib/Horde/Db/Adapter/Base.php index bd65cdb0c..76aec92ea 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Base.php +++ b/framework/Db/lib/Horde/Db/Adapter/Base.php @@ -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 . '"'); } -- 2.11.0