On Thu, 2 Sep 2004, Alan Knowles wrote:
> Marcus Boerger wrote:
>
> >Hello Alan,
> >
> >juts for the record, you can even __autoload the missing exception class:
> >
> >php -n -r 'function __autoload($n) { var_dump($n); eval("class $n extends Exception
> >{}"); } try { } catch(ExcetpionXYZ $e) {}
Marcus Boerger wrote:
Hello Alan,
juts for the record, you can even __autoload the missing exception class:
php -n -r 'function __autoload($n) { var_dump($n); eval("class $n extends Exception {}"); } try { } catch(ExcetpionXYZ $e) {};'
dont you think this is a really horrible kludge?
and besides
Hello Alan,
juts for the record, you can even __autoload the missing exception class:
php -n -r 'function __autoload($n) { var_dump($n); eval("class $n extends Exception
{}"); } try { } catch(ExcetpionXYZ $e) {};'
and besides what should the compiler do? Guess what that exception you specified
Okay, I agree with you on this one.
Very weird behaviour by the way.. I didn't know about this.
"Alan Knowles" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> aghh.. - the previous example was crap
>
> The priciple it was try to make was that
>
>
> require_once 'MyExceptio
aghh.. - the previous example was crap
The priciple it was try to make was that
require_once 'MyException.php'
throw MyException();
then trying to catch MyException leads to a parse error when it's
try()'d and not loaded. means we cant lazy load any Exceptions, and save
file i
aghh.. - another crap example:
The priciple it was try to make was that
require_once 'MyException.php'
throw MyException();
then trying to catch MyException leads to a parse error when it's
try()'d and not loaded.
Regards
Alan
Alan Knowles wrote:
This is a simple example of wh
This is a simple example of why making a parse error out of undefined
Exception types is going to be very problematic.
function test($a) {
if (!extension_exists('sqlite')) {
return;
}
try {
SQLite::query($a);
// parse error!!! - if we dont have sqlite, we dont ha