Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9734 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86664 invoked by uid 1010); 8 May 2004 12:06:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86640 invoked by uid 1007); 8 May 2004 12:06:50 -0000 Message-ID: <20040508120649.86639.qmail@pb1.pair.com> To: internals@lists.php.net References: <409CAEC8.7000103@backendmedia.com> Date: Sat, 8 May 2004 22:06:48 +1000 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Posted-By: 144.132.76.133 Subject: Re: [PHP-DEV] throwing an exception on failed require From: aidan@php.net ("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" wrote in message news:Pine.LNX.4.58.0405081253550.10150@localhost... > 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 without having to > > silence this error and then parsing the error message. And it would > > obviously be BC compatible as uncaught exceptions are fatal. > > A require should fail if it can't find the file, no nice handling as > it's CLEARLY a programmers error. > > regards, > Derick