#33897 [Fbk->Opn]: Incorrect error handling in case of method cals from inside of php engine

From: Date: Mon, 01 Aug 2005 10:32:05 +0000
Subject: #33897 [Fbk->Opn]: Incorrect error handling in case of method cals from inside of php engine
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82759@lists.php.net to get a copy of this message
ID: 33897 User updated by: kpisman at gmail dot com -Summary: Lack of backtrace in case of errors inside methods called form inside of php. Reported By: kpisman at gmail dot com -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: FreeBSD 5.4-STABLE #1: Sat Jul PHP Version: 5.0.4 New Comment: Sample code: ----- <?php class bullshit implements iterator{ function curent(){ } function next(){ } function current(){ echo "current"; throw new exception('bullshit'); } function key(){ } function rewind(){ } function valid(){ return (true); } function __destruct(){ echo "destructor"; } } $f=new bullshit; try{ foreach($f as $thisF){ } } catch (exception $e){ echo "catch !!!"; } ?> ----- Run results: php test-zend.php current Fatal error: Couldn't execute method bullshit::key in Unknown on line 0 destructor (shell returned 255) ---- So, it's clean that this appearance is incorrect. I think this is result of the same bug in Zend engine, that troubles described in first comment. Also first trouble is exists to: error is appears in unknown module at line zero. Previous Comments: ------------------------------------------------------------------------ [2005-07-28 11:30:30] tony2001@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2005-07-28 10:32:44] kpisman at gmail dot com Description: ------------ When php code impliments standart interface (iterator in my case) and there is errors in methods called from inside of php engine (in my case key() ) i got error message with no usefull info: "Error on line 0", so on. If i will call class->key() i got normal backtrace. Expected result: ---------------- I expected to see the same results in both cases. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33897&edit=1

« previous php.bugs (#82759) next »