sometimes we have raygun errors without a message. make it easier to find them

pull/39/head^2
Fabian Jakobs 2015-02-27 11:41:38 +00:00
rodzic ab9cb53cf8
commit 61ccd42969
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -29,6 +29,17 @@ function plugin(options, imports, register) {
warning: new raygun.Client().init({ apiKey: options.keys.warning })
};
for (var client in clients) {
client._send = client.send;
client.send = function(exception, customData, callback, request) {
var ex = exception;
if (!exception.stack)
ex = new Error(exception.message || exception);
return this._send(ex, customData, callback, request);
};
}
clients.error.setVersion(options.version + ".0");
clients.warning.setVersion(options.version + ".0");