<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pedaço &#8211; Rafael Bernard Araujo</title>
	<atom:link href="https://rafael.bernard-araujo.com/tag/pedaco/feed" rel="self" type="application/rss+xml" />
	<link>https://rafael.bernard-araujo.com</link>
	<description>desenvolvendo... while(!success){  try(); }</description>
	<lastBuildDate>Sat, 11 May 2013 16:34:11 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">21941730</site>	<item>
		<title>Force errors to raise an exception in PHP</title>
		<link>https://rafael.bernard-araujo.com/force-errors-to-raise-an-exception-in-php.php</link>
					<comments>https://rafael.bernard-araujo.com/force-errors-to-raise-an-exception-in-php.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Sat, 11 May 2013 16:27:10 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[pedaço]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://rafael.bernard-araujo.com/?p=1052</guid>

					<description><![CDATA[&#60;?php function exception_error_handler($severity, $message, $filename, $lineno) { if (error_reporting() == 0) { return; } if (error_reporting() &#38; $severity) { throw new ErrorException($message, 0, $severity, $filename, $lineno); } } set_error_handler("exception_error_handler");]]></description>
										<content:encoded><![CDATA[<pre class="php" style="font-size: px;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>

<span style="color: #000000; font-weight: bold;">function</span> exception_error_handler<span style="color: #009900;">(</span><span style="color: #000088;">$severity</span><span style="color: #339933;">,</span> <span style="color: #000088;">$message</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lineno</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
        <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #339933;">&amp;</span> <span style="color: #000088;">$severity</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
        <span style="color: #b1b100;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> ErrorException<span style="color: #009900;">(</span><span style="color: #000088;">$message</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$severity</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lineno</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span>
<span style="color: #009900;">}</span>

<a href="http://www.php.net/set_error_handler"><span style="color: #990000;">set_error_handler</span></a><span style="color: #009900;">(</span><span style="color: #0000ff;">"exception_error_handler"</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/force-errors-to-raise-an-exception-in-php.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1052</post-id>	</item>
	</channel>
</rss>
