On Wed, 2007-10-03 at 22:23 +0200, Johannes Schlüter wrote: > Greg, > > On Wed, 2007-10-03 at 15:07 -0500, Greg Beaver wrote: > > Now what? The error message doesn't tell Joe where to find PEAR2::Foo, > > or any other useful information on how to find it, just that it can't be > > found. PEAR2, however, knows exactly where it should be found, and has > > some idea of why it isn't there (package not installed). In addition, > > there is no stack trace that can be used to debug the call chain that > > led to the problem if PEAR2::Foo *is* installed, and Joe reports the > > problem to the maintainers of PEAR2::Blah. > > > > Without my die(new Exception()), there is no way to pass this known > > information back out of PEAR2_Autoload to Joe, and it makes both > > development and debugging much more difficult, and unnecessarily so. > > function __autoload($a) { > $b = debug_backtrace();
This, of course, should have been $bt = debug_backtrace(); ;-) > if ($bt[1]["function"] == "class_exists") { > echo "in get_class"; > } > } > > should work quite well without obscure engine hacks - or am I missing > something? > > johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php