Last active
August 29, 2015 14:10
-
-
Save jessicard/cb3792fd22a603c028df to your computer and use it in GitHub Desktop.
Revisions
-
jessicard revised this gist
Nov 27, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ // In your extension's index.html you'll also need to include Bugsnag and disable auto-notification: // <script src="bugsnag-2.min.js" data-apiKey="your-api-key" data-autoNotify="false"> // You can then add try/catch blocks in your content scripts, and pass any errors back up to your extension: -
jessicard created this gist
Nov 26, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ // <script src="bugsnag-2.min.js" data-apiKey="your-api-key" data-autoNotify="false"> // You can then add try/catch blocks in your content scripts, and pass any errors back up to your extension: // Inside your content script try { // Some code in your content scripts } catch(e) { var exceptionObj = {stack: e.stack, message: e.message, name: e.name}; chrome.runtime.sendMessage("extension-id", {type: "error", exception: exceptionObj}); } // Then in your extension code you could listen for this message and notify Bugsnag: // Inside your extension chrome.runtime.onMessage.addListener(function (message) { if(message.type == "error") { Bugsnag.notifyException(message.exception); } });