airbrake/airbrake-js — pull request #21 by gaiottino (2013-02-03 10:10:31+00:00)
Title: Make it possible to setup onerror manually

I've added a new option logOnError as well as exposed the Notifier so that it's possible to manually setup the onerror handling.

If you set ```Airbrake.setLogOnError(false);``` the script will no longer automatically send notifications.

I've done this because in our project, we've got special handling for some of the 3rd party libs we use. These libs (such as Highcharts) will throw an error but it can be taken care of and we do not wish to notify Airbrake in such instances.

If the error is deemed significant we notify Airbrake using

```javascript
new Airbrake.Notifier().notify({
message: ex,
stack: '()@' + url + ':' + line
})
```

Hope someone else finds this useful as well.