anchor.diff:                run(nextTask);
               }
             } else {
  -            // We are basically in trouble - do something clever.
  +            reportError('Could not contact the server and get a new task');
             }
           }
         }
  
positive.code:         var client = new XMLHttpRequest();
          function handleReady() {
            if (this.readyState == this.DONE) {
              if (last_reported_id != current_id && did_start) {
                getNextTask();
                last_reported_id = current_id;
              }
            }
          }
  
negative.code:         }
        }
  
        window.onerror = function (message, url, lineNumber) {
          if (url) {
            reportError(url + ':' + lineNumber + ':' + message);
          } else {
            reportError(message);
          }
        }
  
        function reportError(msg) {
          var client = new XMLHttpRequest();
          function handleReady() {
            if (this.readyState == this.DONE && this.status != 200) {
              // We could not report, pop up to notify if running interactively.
              alert(this.status);
            }
          }
          client.onreadystatechange = handleReady;
          client.open('POST', '$errorReportingUrl?test=1');
          client.setRequestHeader('Content-type',
                                  'application/x-www-form-urlencoded');
          client.send(msg);
        }
  
        function reportMessage(msg) {
          if (msg == 'STARTING') {
            did_start = true;
  