Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51850 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6086 invoked from network); 9 Apr 2011 16:19:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2011 16:19:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:51993] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/32-29179-62780AD4 for ; Sat, 09 Apr 2011 12:19:51 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 1CA7D7000347 for ; Sat, 9 Apr 2011 17:19:47 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id LC8cRZE-SmOB for ; Sat, 9 Apr 2011 17:19:46 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp2.ist.utl.pt (Postfix) with ESMTP id CEA827000499 for ; Sat, 9 Apr 2011 17:19:46 +0100 (WEST) Received: from damnation (damnation-air.dulce.lo.geleia.net [IPv6:2001:470:94a2:2:dc38:b9de:61a9:b30]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 1E53A2009009 for ; Sat, 9 Apr 2011 17:19:45 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: Date: Sat, 09 Apr 2011 17:19:44 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.01 (Linux) Subject: Re: [PHP-DEV] Why does zend_call_function return SUCCESS if an exception is thrown From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Sat, 09 Apr 2011 17:03:16 +0100, Herman Radtke wrote: > An extension is using zend_call_function to call a userland function. > If the userland function throws an exception, zend_call_function will > still return SUCCESS. Why isn't zend_call_function returning FAILURE > on an exception? Is there a way to check if an exception was thrown > after zend_call_function returns a SUCCESS? > Because what "success" means in this context is that the function could be executed. If you see the implementation of zend_call_function, you'll notice the conditions that return FAILURE are those where the execution of the target function doesn't even begin. You can check for exceptions via EG(exception). -- Gustavo Lopes