mikeal/request — pull request #365 by danmactough (2012-11-07 21:48:55+00:00)
Title: Fix uncatchable errors. Update tests/test-errors.js for coverage.

Request#init has two places where it will emit an 'error' event, but listeners have not had a chance to attach yet. So any emitted errors actually throw.

Tests included.

Example:
```js
request('/invalid').on('error', function (e){
console.error('Hey... I should have been caught!');
})
// Throws
Error: Invalid URI "/invalid"
```