[PHP-DEV] throwing an exception on failed require

2004-05-08 Thread Lukas Smith
Hi, I think it would be useful if require would throw an exception on failure. Currently one would use @include in order to load in a file that could be missing or could contain parse errors. However it is impossible to easy find out if the file was missing, had parse errors or returned false.

Re: [PHP-DEV] throwing an exception on failed require

2004-05-09 Thread Lukas Smith
Derick Rethans wrote: On Sat, 8 May 2004, Lukas Smith wrote: By throwing an exception inside require with the necessary information it would be able to cleanly handle this situation without having to silence this error and then parsing the error message. And it would obviously be BC compatible as

Re: [PHP-DEV] throwing an exception on failed require

2004-05-08 Thread Derick Rethans
On Sat, 8 May 2004, Lukas Smith wrote: > I think it would be useful if require would throw an exception on failure. NO! Internal functions do NOT throw exceptions, period. > By throwing an exception inside require with the necessary information > it would be able to cleanly handle this situation

Re: [PHP-DEV] throwing an exception on failed require

2004-05-08 Thread Aidan Lister
Hehe, shut down Lukas. I'd love to know why file_exists doesn't search the include path like every other file function "Derick Rethans" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 8 May 2004, Lukas Smith wrote: > > > I think it would be useful if require would throw an