#44027 [Opn->Bgs]: try catch not working

From: Date: Sun, 03 Feb 2008 02:22:29 +0000
Subject: #44027 [Opn->Bgs]: try catch not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121916@lists.php.net to get a copy of this message
ID: 44027 Updated by: rasmus@php.net Reported By: anil dot softx at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.2.5 New Comment: Exceptions are only thrown by OO code in PHP. Previous Comments: ------------------------------------------------------------------------ [2008-02-03 01:41:53] anil dot softx at gmail dot com Description: ------------ Exception seems not working. Please see the example code below. Reproduce code: --------------- try{ non_existant_function(); }catch(Exception $e){ echo "Exception thrown:" . $e->getMessage(); } Expected result: ---------------- Expected to throw exception in above code but the script dies with a Fatal error: call no non existant function ... Actual result: -------------- Fatal Error: call to non existant function non_existant_function(). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44027&edit=1

« previous php.bugs (#121916) next »