title: How to catch a "Maximum call stack size exceeded" error in javascript?
body: <p>I am using a js tree view plugin for my app, and I am doing some stress testing. In my test, I load 200k files into this plugin. And then the plugin crashes in chrome like this:</p>
  
  <pre><code>Uncaught RangeError: Maximum call stack size exceeded
      at Function.fb [as find] (jquery.min.js:2)
      at m.fn.init.find (jquery.min.js:2)
      at a.jstree.core.init (jstree.min.js:2)
      at Object.a.jstree.create (jstree.min.js:2)
      at HTMLDivElement.&lt;anonymous&gt; (jstree.min.js:2)
      at Function.each (jquery.min.js:2)
      at m.fn.init.each (jquery.min.js:2)
      at m.fn.init.a.fn.jstree (jstree.min.js:2)
      at renderView (main.js:274)
      at Worker.myWorker.onmessage (main.js:232)
  </code></pre>
  
  <p>But I don't want the whole page to crash. Is there a way I can catch this error? And how would I simulate this to test so I can see if I can catch it, as running my usual test would take all night.</p>
  
  <p>Thanks</p>