title: Chrome truncates error messages and adds "<omitted>" in window.onerror
body: <p>We use window.onerror to catch unhandled exceptions (to log them for the dev team, and display a friendly user alert). Recently we noticed that in Google Chrome, the error message got truncated if it was above a certain length, and the text "<code>...&lt;omitted&gt;...</code>" was mysteriously added to the error message.</p>
  
  <p>The code below will demonstrate this (in Chrome ver 33.0.1750).  I was wondering if anyone else has had this problem?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"&gt;
  
          window.onerror = function (errorMsg, url, lineNumber) {
              alert('Error: ' + errorMsg);
          }
  
          var throwError = function () {
              throw new Error(
              'Something went wrong. Something went wrong. Something went wrong. Something went wrong. ' +
              'Something went wrong. Something went wrong. Something went wrong. Something went wrong. ' + 
              'Something went wrong. Something went wrong. Something went wrong. Something went wrong. ' + 
              'Some text gets truncated before this point!');
          }
  
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;Hello World&lt;/h1&gt;
          &lt;input type="button" onclick="throwError()" value="Throw uncaught error!" /&gt;&lt;br /&gt;&lt;br /&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>