send errors to Raven
This commit is contained in:
parent
63fe2c7099
commit
7ccf89b43b
|
@ -51,8 +51,8 @@ class FileSender extends EventEmitter {
|
||||||
reader.onload = function(event) {
|
reader.onload = function(event) {
|
||||||
resolve(new Uint8Array(this.result));
|
resolve(new Uint8Array(this.result));
|
||||||
};
|
};
|
||||||
reader.onerror = function(event) {
|
reader.onerror = function(err) {
|
||||||
reject(event.explicitOriginalTarget.error.name);
|
reject(err);
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
|
@ -2,6 +2,8 @@ const FileSender = require('./fileSender');
|
||||||
const { notify } = require('./utils');
|
const { notify } = require('./utils');
|
||||||
const $ = require('jquery');
|
const $ = require('jquery');
|
||||||
|
|
||||||
|
const Raven = window.Raven;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// reset copy button
|
// reset copy button
|
||||||
const $copyBtn = $('#copy-btn');
|
const $copyBtn = $('#copy-btn');
|
||||||
|
@ -102,7 +104,7 @@ $(document).ready(function() {
|
||||||
notify('Your upload has finished.');
|
notify('Your upload has finished.');
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log('Upload error name: ' + err);
|
Raven.captureException(err);
|
||||||
$('#page-one').hide();
|
$('#page-one').hide();
|
||||||
$('#upload-error').show();
|
$('#upload-error').show();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue