kopia lustrzana https://github.com/c9/core
Report error dialog errors to raygun
rodzic
c7218ede12
commit
86121e1a34
|
@ -1,3 +1,8 @@
|
||||||
|
/**
|
||||||
|
* This error handler is for server side error logging.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
plugin.consumes = ["raygun"];
|
plugin.consumes = ["raygun"];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
main.consumes = ["Plugin", "ui", "metrics"];
|
main.consumes = ["Plugin", "ui", "metrics", "error_handler"];
|
||||||
main.provides = ["dialog.error"];
|
main.provides = ["dialog.error"];
|
||||||
return main;
|
return main;
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ define(function(require, exports, module) {
|
||||||
var Plugin = imports.Plugin;
|
var Plugin = imports.Plugin;
|
||||||
var ui = imports.ui;
|
var ui = imports.ui;
|
||||||
var metrics = imports.metrics;
|
var metrics = imports.metrics;
|
||||||
|
var errorHandler = imports.error_handler;
|
||||||
|
|
||||||
/***** Initialization *****/
|
/***** Initialization *****/
|
||||||
|
|
||||||
|
@ -121,7 +122,10 @@ define(function(require, exports, module) {
|
||||||
return console.error("empty error message", message);
|
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() {
|
hide(function() {
|
||||||
|
|
|
@ -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
|
* @extends Plugin
|
||||||
* @singleton
|
* @singleton
|
||||||
|
|
Ładowanie…
Reference in New Issue