Yes, E_ALL includes notices, but it won't affect the error controller
because notices aren't exceptions.

However, you can use php's
set_error_handler<http://us.php.net/set_error_handler>function to
define a custom callback for errors (includes notices, warnings,
etc.) Once the notices are "promoted" to exceptions, the default
ErrorController will catch them.

BTW if you're going to create custom error handler, don't forget to start
the function body with this check:

if (!(error_reporting() & $errno)) {
    // This error code is not included in error_reporting
    return;
}

Otherwise you may get unexpected errors.

--
*Hector Virgen*
Sr. Web Developer
Walt Disney Parks and Resorts Online
http://www.virgentech.com



On Thu, Sep 2, 2010 at 9:47 AM, debussy007 <[email protected]> wrote:

>
> Hi,
>
> When any exception is thrown, the request is forwarded to an error handler.
> I would like to have the same behaviour when a "notice" occurs.
>
> I specify the following in the bootstrap
> error_reporting(E_ALL|E_STRICT);
> E_ALL should include notice, don't it ?
>
> Thank you for any help
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/Catch-any-PHP-notice-tp2524467p2524467.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>

Reply via email to