Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/tmp/*
/dist/airbrake-js.js
/dist/airbrake-js.min.js
/components
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Include the following Javascript snippet in your header.
try {
return fn.apply(this, arguments);
} catch (er) {
Airbrake.push({error: er});
throw er;
Airbrake.push({ error: er });
}
};
};
Expand Down Expand Up @@ -66,12 +65,16 @@ Alternatively, you can report errors directly.
// This will throw if the document has no head tag
document.head.insertBefore(document.createElement("style"));
} catch(er) {
Airbrake.push({
error: er
});
throw er;

// `push` will report the error, and then rethrow it
// after it has been reported.
// It will not be rethrown in this catch block,
// but when it is rethrown it will carry its original backtrace.
Airbrake.push({ error: er });
}

If you want to suppress rethrowing of reported errors by the notifier, include `catch: true` in the data payload.

If you're working with [jQuery Deferreds](http://api.jquery.com/category/deferred-object/) it makes sense to hook into the `fail` handler. This example reports errors thrown from within [`$.ajax`](http://api.jquery.com/jQuery.ajax/).

$.ajax("/operation").done(function(data) {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"traceKit": "aba506def7506aaf3d760e29f87ccee416d1702a"
"traceKit": "7e87d16f0f3107dce10510a516c72885f0a5ccba"
}
}
9 changes: 0 additions & 9 deletions components/traceKit/bower.json

This file was deleted.

59 changes: 0 additions & 59 deletions components/traceKit/grunt.js

This file was deleted.

2 changes: 0 additions & 2 deletions components/tracekit/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions components/tracekit/.travis.yml

This file was deleted.

95 changes: 0 additions & 95 deletions components/tracekit/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions components/tracekit/package.json

This file was deleted.

Loading