Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34322 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89495 invoked by uid 1010); 3 Jan 2008 08:54:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89480 invoked from network); 3 Jan 2008 08:54:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2008 08:54:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.7 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.7 mail.jdi-ict.nl Linux 2.6 Received: from [82.94.239.7] ([82.94.239.7:42752] helo=mail.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/91-11345-6B2AC774 for ; Thu, 03 Jan 2008 03:54:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id m038sAi9031383; Thu, 3 Jan 2008 09:54:11 +0100 Date: Thu, 3 Jan 2008 09:54:11 +0100 (CET) X-X-Sender: derick@kossu.ez.no To: =?UTF-8?Q?Fredrik_Holmstr=C3=B6m?= cc: internals@lists.php.net In-Reply-To: <8697e5310712310328n4c0fa235wb5654178028942bd@mail.gmail.com> Message-ID: References: <8697e5310712310328n4c0fa235wb5654178028942bd@mail.gmail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1166240025-1199350451=:21312" Subject: Re: [PHP-DEV] Exceptions instead of Fatal Error when calling non existent method? From: derick@php.net (Derick Rethans) --8323329-1166240025-1199350451=:21312 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 31 Dec 2007, Fredrik Holmstr=C3=B6m wrote: > What I would like to argue/request is that there should be a way to > get an exception thrown when you call a non existent method on an > object, since it's not possible to catch E_ERROR with a user defined > function using set_error_handler() I can't see anyway to accomplish > this in the current implementation? E_ERROR should during normal runs of your program *never* be hit in the=20 first place. If it is something critical that still can be handled,=20 E_RECOVERABLE_ERROR should be used inside PHP. If that is not the case,=20 please let us now and we can address that. As for the calling undefined methods, __call() is your friend. regards, Derick --8323329-1166240025-1199350451=:21312--