Hi Jochem, not that you really want it, but you could pass the exception as a static property to fully preserve and throw it later again. Something like this:
...
sprintf('class %s {
public static $e;
public function __construct()
{
throw self::$e;
}
public function __call($method, array $args)
{
throw self::$e;
}
public function __callStatic($method, array $args)
{
throw self::$e;
}
}', $class);
$class::$e = $e;
...
Am Donnerstag, den 10.07.2008, 19:14 +0200 schrieb Jochem Maas:
[...]
> function __autoload($class)
> {
> try {
> throw new Exception('foo');
> } catch (Exception $e) {
> self::handleDebug($e);
>
> if (!class_exists($class, false))
> eval(sprintf('
> class %1$s
> {
> public function __construct() { throw
> new AL_Exception("Class %1$s not found: %2$s"); }
> public function __call($m, $a) { throw
> new AL_Exception("Class %1$s not found: %2$s"); }
> public static function __callStatic($m, $a) { throw
> new AL_Exception("Class %1$s not found: %2$s"); }
> }', $class, $e->__toString()));
> }
> }
>
> which works best when __autoload() isn't triggered by class_exists("Foo",
> true)
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
