title: Proper non-string Javascript exceptions
body: <p>Somehow this does not feel like the culmination of the 50 years programming language development:</p>
  
  <pre><code>  throw "My exception message here";
  </code></pre>
  
  <p>What's the correct way to do exceptions in Javascript, so that</p>
  
  <ul>
  <li><p>They can be identified (instanceof)</p></li>
  <li><p>They can carry other payload besides the default message and stack trace</p></li>
  <li><p>They "subclass" base Exception, so that debug console and such can extract meaningful information about the exception</p></li>
  <li><p>Possible nested exceptions (converting exception to another): if you need to catch an exception and rethrow new one the orignal stack trace would be preserved and could be meaningfully read by debugging tools</p></li>
  <li><p>They follow Javascript best practices</p></li>
  </ul>