Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9732 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36479 invoked by uid 1010); 8 May 2004 10:58:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 36355 invoked from network); 8 May 2004 10:58:31 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 8 May 2004 10:58:31 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.10/8.12.10) with ESMTP id i48AwTD1023258; Sat, 8 May 2004 12:58:29 +0200 Date: Sat, 8 May 2004 12:58:17 +0200 (CEST) X-X-Sender: derick@localhost To: Lukas Smith cc: PHP Developers Mailing List In-Reply-To: <409CAEC8.7000103@backendmedia.com> Message-ID: References: <409CAEC8.7000103@backendmedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] throwing an exception on failed require From: derick@php.net (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 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