jquery parseJSON handling php errors
<p>Is there any clever way of handling php errors returned in the data object. Currently I occasionally get things like:</p>

<pre><code>&lt;br /&gt;
&lt;font size='1'&gt;&lt;table class='xdebug-error'
.....
</code></pre>

<p>this is generally followed by the json object I'm expecting. Is there any systematic way to look for these errors? An example call I'm using might be:</p>

<pre><code>function getMyCharities(callback) {
$.post("my_file.php", function(data) {
    callback(data);
});
}
</code></pre>

<p>In the documentation for jquery I've found:</p>

<pre><code> .done(function() { alert("second success"); }) 
.fail(function() { alert("error"); })
.always(function() { alert("finished"); });
</code></pre>

<p>but these don't handle this type of error as I've tested it. I also don't want to build a error parser if possible.</p>

<p>thanks</p>
