note 73241 deleted from language.oop5.autoload by felipe
| From: | felipe@php.net | Date: | Mon, 24 Mar 2008 22:42:12 +0000 |
| Subject: | note 73241 deleted from language.oop5.autoload by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-137506@lists.php.net to get a copy of this message | ||
Note Submitter: p dot scheit at zweipol dot net
----
If you really wan't to use something like Exceptions, but you don't want to use eval (like
me) I have a suggestion for you.
This is "oldschool" Try and Catching by checking the return value.
$cfgLine = $this->generateMapping($className,NULL,TRUE);
if ($cfgLine instanceof Exception) {
$e = $cfgLine;
trigger_error('uncaught exception: '.$e->getMessage().'
'.$e->getTraceAsString(), E_USER_ERROR);
}
you get the point...
This looks like a usual uncaught Exception.
It's a little bit tricky to check all return values from your Methods, but you can catch and
throw something ... better than doing nothing