toufik toufik wrote:
I'm using the errorHandler function
(http://www.zend.com/zend/spotlight/error.php) to manage error handling in
my code, the problem is that in all the tests that I did the error type is
always E_WARNING, I've tested the div by 0, database error,....
how can I have an E_ERROR, because I need that the execution stops in teh
case of E_ERROR errors.
You can't
<quote src="http://www.php.net/set_error_handler">
Note: The following error types cannot be handled with a
user defined function: E_ERROR, E_PARSE, E_CORE_ERROR,
E_CORE_WARNING, E_COMPILE_ERROR and E_COMPILE_WARNING.
</quote>
The most you can achieve is a E_USER_ERROR
<?php
if ($divisor == 0) trigger_error('Division by zero', E_USER_ERROR);
?>
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--