<?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>Neyric.com &#187; error</title>
	<atom:link href="http://neyric.com/tag/error/feed/" rel="self" type="application/rss+xml" />
	<link>http://neyric.com</link>
	<description>projects, programming, blogging...</description>
	<lastBuildDate>Sat, 29 Jan 2011 19:51:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Reporting javascript errors to the server</title>
		<link>http://neyric.com/2007/04/26/reporting-javascript-errors-to-the-server/</link>
		<comments>http://neyric.com/2007/04/26/reporting-javascript-errors-to-the-server/#comments</comments>
		<pubDate>Thu, 26 Apr 2007 13:12:13 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=21</guid>
		<description><![CDATA[In every web application that intensivly uses javascript: errors may occur ! Since I&#8217;m not able to fully-test my web-application each time a modification is made, I decided to report javascript errors to the server. It proved to be very &#8230; <a href="http://neyric.com/2007/04/26/reporting-javascript-errors-to-the-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In every web application that intensivly uses javascript: errors may occur !<br />
Since I&#8217;m not able to fully-test my web-application each time a modification is made, I decided to report javascript<br />
errors to the server. It proved to be very useful to detect bugs very quickly.</p>
<p>Here&#8217;s an example on how to do so with <a href="http://developer.yahoo.com/yui/" target="_blank">YUI</a> :</p>
<pre>
window.onerror = function(msg, href, lineNo) {
  var postData = 'msg='+msg+'&amp;file='+href+'&amp;line='+
		lineNo+'&amp;infos='+navigator.userAgent;
 YAHOO.util.Connect.asyncRequest('POST', 'report_error.php',
              { success: function(o){}, failure: function(o){} }, postData);
}</pre>
<p>I just added &#8220;navigator.userAgent&#8221; to the parameters of window.onerror, so you know<br />
which browser generated the error.</p>
<div class="shr-publisher-128"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2007/04/26/reporting-javascript-errors-to-the-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

