HenrikJoreteg/tryit — pull request #2 by shinnn (2014-12-23 17:32:32+00:00)
Title: Prevent callback function being called twice

## Why

Because the current version may run callback function **twice**.

## Example

```js
var tryit = require('tryit');

var count = 0;

function noop() {
// doesn't throw
}

tryit(noop, function(e) {
count++;
throw new Error('This function was called ' + count + ' time(s).');
});
```

As you can see, the callback function always throws an error.

You may expect that the thrown error will be:

```
Error: This function was called 1 time(s).
```

But, the actual error is:

```
Error: This function was called 2 time(s).
```

When the first function doesn't throw any errors but the callback function throws an error, unfortunately it runs the callback function again.

This PR fixes this incorrect behavior.