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) {
|
||||
resolve(new Uint8Array(this.result));
|
||||
};
|
||||
reader.onerror = function(event) {
|
||||
reject(event.explicitOriginalTarget.error.name);
|
||||
reader.onerror = function(err) {
|
||||
reject(err);
|
||||
};
|
||||
})
|
||||
])
|
||||
|
@ -2,6 +2,8 @@ const FileSender = require('./fileSender');
|
||||
const { notify } = require('./utils');
|
||||
const $ = require('jquery');
|
||||
|
||||
const Raven = window.Raven;
|
||||
|
||||
$(document).ready(function() {
|
||||
// reset copy button
|
||||
const $copyBtn = $('#copy-btn');
|
||||
@ -102,7 +104,7 @@ $(document).ready(function() {
|
||||
notify('Your upload has finished.');
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('Upload error name: ' + err);
|
||||
Raven.captureException(err);
|
||||
$('#page-one').hide();
|
||||
$('#upload-error').show();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user