PHP简单的dom解析器错误处理

I am trying to use php simple dom parser to a bunch of pages but i have a problem with SOME of them. While in 90% of the pages everything working fine, in some urls i cant save the curl output to a string... The url exists of course...

curl_setOpt($ch, CURLOPT_POST, FALSE);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile);
$data = curl_exec($ch);
$html= str_get_html($data);

if ($html) {
    ....
}

My code is something like this but it never gets inside if. I can echo $data without any problem but i cant echo $html :S I also tried file_get_html but nothing. The weird is that i dont get any error. How i can configure php simple dom parser to throw me the error.

Oh my GOD! It was the file size of data... I changed (simple_html_dom.php) to something bigger and i am fine...

define('MAX_FILE_SIZE', 800000);

So poor error handling :(