<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 16:19:46 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Alexander Netkachev's Blog: PHP coding tip: Convert notices and warnings into Exceptions]]></title>
      <guid>http://www.phpdeveloper.org/news/6520</guid>
      <link>http://www.phpdeveloper.org/news/6520</link>
      <description><![CDATA[<p>
Exceptions and warnings can be tossed out from your code at some odd locations sometimes. There's a few options that you have when they jump out, including pushing them out to an error log or just ignoring them completely. <i>Alexander Netkachev</i> has a different solutions, though - handling them with something already built into PHP, <a href="http://www.alexatnet.com/Blog/Index/2006-10-18/php-coding-tip-convert-notices-and-warnings-into-exceptions">using exception reporting</a>.
</p>
<blockquote>
This coding tip demonstrates how to deal with PHP core notices and warning (aka recoverable errors) in the exception way, using try/catch statement.
</blockquote>
<p>
IT's a simple idea, but it can definitely help you keep all of you errors in one place. The sample code he gives shows both a basic idea of the solution and a bit more complex example, providing more detailed messages for different exception types.
</p>]]></description>
      <pubDate>Wed, 18 Oct 2006 07:19:54 -0500</pubDate>
    </item>
  </channel>
</rss>
