throwing exceptions in __autoload
| From: | Robert Janeczek | Date: | Sat, 19 Jun 2004 16:08:42 +0000 |
| Subject: | throwing exceptions in __autoload | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-10618@lists.php.net to get a copy of this message | ||
both: __autoload and exceptions are great features in php5, but together
they don`t seem to work well. i want to add some kind of error reporting to
autoload which will throw exception if class file wasn`t found in my
predefined directories. i`ve prepared my own exception class which should
show me nice little error message. what i get is:
Fatal error: __autoload(dupa) threw an exception of type 'Exception' in
[blah blah] on line 87
Fatal error: Exception thrown without a stack frame in Unknown on line 0
the same happens when pure Exception class is used. 'try' block around full
code doesn`t help.
i use yesterday`s php5 windows build. should i report this as an error or
exceptions should [not] work like this?
rash