title: Catch errors caused by evaluate() in CasperJS / PhantomJS?
body: <p>I'm wondering why the following code isn't picking up errors output in the console by javascript code executed using the evaluate() method.</p>
  
  <pre><code>casper.on 'resource.error', -&gt;
      @echo 'Resource error: ' + "Error code: "+resourceError.errorCode+" ErrorString: "+resourceError.errorString+" url: "+resourceError.url+" id: "+resourceError.id, "ERROR"
  </code></pre>
  
  <p>Since evaluate() executes the code in the context of the web browser, shouldn't any errors caused by it be caught by the code above?</p>