Report error dialog errors to raygun

pull/199/head
Tim Robinson 2015-09-30 12:31:13 +00:00
rodzic c7218ede12
commit 86121e1a34
3 zmienionych plików z 14 dodań i 3 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
/**
* This error handler is for server side error logging.
*
**/
"use strict";
plugin.consumes = ["raygun"];

Wyświetl plik

@ -1,7 +1,7 @@
define(function(require, exports, module) {
"use strict";
main.consumes = ["Plugin", "ui", "metrics"];
main.consumes = ["Plugin", "ui", "metrics", "error_handler"];
main.provides = ["dialog.error"];
return main;
@ -9,6 +9,7 @@ define(function(require, exports, module) {
var Plugin = imports.Plugin;
var ui = imports.ui;
var metrics = imports.metrics;
var errorHandler = imports.error_handler;
/***** Initialization *****/
@ -121,7 +122,10 @@ define(function(require, exports, module) {
return console.error("empty error message", message);
}
console.error("Error dialog shown: ", getMessageString(message));
errorHandler.log(new Error("Error dialog shown"), {
message: message,
messageString: getMessageString(message),
});
}
hide(function() {

Wyświetl plik

@ -1,5 +1,7 @@
/**
* This error handler catches window.onerror and sends them to raygun.io
* This error handler is for client side error logging
* It also automatically catches window.onerror and sends them to raygun.io
* You can also import it and call .log to manually send an error
*
* @extends Plugin
* @singleton