title: Node assert.throws not catching exception
body: <p>Given this code:</p>
  
  <pre><code>var assert = require('assert');
  
  function boom(){
      throw new Error('BOOM');
  }
  
  assert.throws( boom(), Error );
  </code></pre>
  
  <p>I get this output, with node 0.4.9:</p>
  
  <pre><code>node.js:134
          throw e; // process.nextTick error, or 'error' event on first tick
          ^
  Error: BOOM
      at boom ([EDITED]/assert.throws.test.js:4:9)
      at Object.&lt;anonymous&gt; ([EDITED]/assert.throws.test.js:7:17)
      at Module._compile (module.js:402:26)
      at Object..js (module.js:408:10)
      at Module.load (module.js:334:31)
      at Function._load (module.js:293:12)
      at Array.&lt;anonymous&gt; (module.js:421:10)
      at EventEmitter._tickCallback (node.js:126:26)
  </code></pre>
  
  <p>This, to me, implies that an uncaught exception has occurred, as opposed to a reported, caught exception. Looking in the docs, I notice that the examples look more like this:</p>
  
  <pre><code>var assert = require('assert');
  
  function boom(){
      throw new Error('BOOM');
  }
  
  assert.throws( boom, Error );
  </code></pre>
  
  <p>But how do you test if it throws an exception given a certain input? For example:</p>
  
  <pre><code>var assert = require('assert');
  
  function boom(blowup){
      if(blowup)
          throw new Error('BOOM');
  }
  
  assert.throws( boom, Error );
  </code></pre>
  
  <p>This will fail. What am I doing wrong, or what secret does everybody know but me?</p>