Did you already look into Zend\Stdlib\ErrorHandler? https://github.com/zendframework/zf2/blob/master/library/Zend/Stdlib/ErrorHandler.php
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 21 February 2013 19:30, Timothy Madden [via Zend Framework Community] < ml-node+s634137n4659245...@n4.nabble.com> wrote: > Hello > > Is there a way in Zend that allows me to turn php warnings and notices > into exceptions ? > > In my application an undefined array index or a foreach() statement that > tries to iterate a NULL variable is clearly an application error, not a > notice or warning. > > Is there a way for the Zend Framework to do the equivalent of: > > function exception_error_handler($errno, $errstr, $errfile, $errline ) { > throw new ErrorException($errstr, $errno, 0, $errfile, $errline); > } > set_error_handler("exception_error_handler"); > > Thank you, > Timothy Madden > > > -- > List: [hidden email]<http://user/SendEmail.jtp?type=node&node=4659245&i=0> > Info: http://framework.zend.com/archives > Unsubscribe: [hidden > email]<http://user/SendEmail.jtp?type=node&node=4659245&i=1> > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://zend-framework-community.634137.n4.nabble.com/Any-way-for-Zend-to-turn-php-warnings-notices-into-exceptions-tp4659245.html > To start a new topic under Zend Framework, email > ml-node+s634137n634138...@n4.nabble.com > To unsubscribe from Zend Framework Community, click > here<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=634137&code=b2NyYW1pdXNAZ21haWwuY29tfDYzNDEzN3wxNzE0OTI1MTk4> > . > NAML<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Any-way-for-Zend-to-turn-php-warnings-notices-into-exceptions-tp4659245p4659246.html Sent from the Zend Framework mailing list archive at Nabble.com.