mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +9655 from c9/report-error-dialog-errors
Report error dialog errors to raygun
This commit is contained in:
commit
f8158a6522
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* This error handler is for server side error logging.
|
||||
*
|
||||
**/
|
||||
|
||||
"use strict";
|
||||
|
||||
plugin.consumes = ["raygun"];
|
||||
|
||||
@ -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 *****/
|
||||
|
||||
@ -114,14 +115,17 @@ define(function(require, exports, module) {
|
||||
+ (message.className ? message.className : "");
|
||||
|
||||
if (!message.noError) {
|
||||
metrics.increment("dialog.error");
|
||||
|
||||
if (!message) {
|
||||
console.trace();
|
||||
return console.error("empty error message", message);
|
||||
}
|
||||
|
||||
console.error("Error dialog shown: ", getMessageString(message));
|
||||
metrics.increment("dialog.error");
|
||||
|
||||
errorHandler.log(new Error("Error dialog shown"), {
|
||||
message: message,
|
||||
messageString: getMessageString(message),
|
||||
});
|
||||
}
|
||||
|
||||
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
|
||||
* @singleton
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user