ID:               31304
 Comment by:       dhopkins at DonHopkins dot com
 Reported By:      jhargis at gmail dot com
 Status:           No Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Debian Linux 2.4.27-1-386
 PHP Version:      5.0.3
 New Comment:

Tony2001: Of course throwing an exception is fatal, but the point of
this bug is that THE ERROR MESSAGE DOES NOT TELL THE FILE OR LINE
NUMBER. That's what the bug description means by "non descript fatal".


The bug is not that it throws a fatal error. That is the documented
behavior. The bug is that the error message does not tell the line
number or file name, so it makes it extremely difficult to find which
line of code is causing this problem. 

I am faced this problem in a huge body of code that I didn't write, and
I have no idea where to start looking. Now I have to go over every
destructor and look for throws, or calls to code that might throw,
because the error message is so uninformative. It could take weeks to
track down the bug. But if the error message would simply tell me the
line number and file name, then it would take seconds to find the bug.
That is a bug, and a waste of time. 

Sniper: No feedback is necessary, this bug is self explanatory and easy
to reproduce. Please stop sweeping bugs under the rug. jhargis clearly
asked for "Something other than a non descriptive fatal." May I suggest
"a descriptive fatal", perhaps with a line number and file name in it. 

This just demonstrates yet again that the PHP team deserves their
infamous reputation for sweeping bugs and security holes under the rug.


Previous Comments:
------------------------------------------------------------------------

[2005-01-31 22:28:36] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2005-01-10 22:00:37] [EMAIL PROTECTED]

Throwing an exception is fatal error by it's nature. 
The error message clearly says what's wrong.
Why do you expect warning or anything else ?


------------------------------------------------------------------------

[2004-12-26 17:06:23] jhargis at gmail dot com

Description:
------------
When the destructor issues an exception, it goes unhandled (obviously),
however tossing a fatal does not seem like the appropriate course of
action.

Fatal error: Exception thrown without a stack frame in Unknown on line
0

Reproduce code:
---------------
<?php
class MyClass {
  function __destruct(){
    throw new Exception('fail');
  }
}
$n = new MyClass();
?>

Expected result:
----------------
A warning?  Something other than a non descriptive fatal.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31304&edit=1

Reply via email to