mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Move ignoreSentry parameter of logGlobal to be last in parameter list
This commit is contained in:
parent
d0cef8c836
commit
9342262f5c
@ -182,7 +182,7 @@ let Form = React.createClass({
|
||||
delete formData.password;
|
||||
}
|
||||
|
||||
console.logGlobal(err, false, formData);
|
||||
console.logGlobal(err, formData);
|
||||
|
||||
if(this.props.isInline) {
|
||||
let notification = new GlobalNotificationModel(getLangText('Something went wrong, please try again later'), 'danger');
|
||||
|
@ -440,7 +440,7 @@ const ReactS3FineUploader = React.createClass({
|
||||
onComplete(id, name, res, xhr) {
|
||||
// There has been an issue with the server's connection
|
||||
if (xhr && xhr.status === 0 && res.success) {
|
||||
console.logGlobal(new Error('Upload succeeded with a status code 0'), false, {
|
||||
console.logGlobal(new Error('Upload succeeded with a status code 0'), {
|
||||
files: this.state.filesToUpload,
|
||||
chunks: this.state.chunks,
|
||||
xhr: this.getXhrErrorComment(xhr)
|
||||
@ -498,7 +498,7 @@ const ReactS3FineUploader = React.createClass({
|
||||
},
|
||||
|
||||
onError(id, name, errorReason, xhr) {
|
||||
console.logGlobal(errorReason, false, {
|
||||
console.logGlobal(errorReason, {
|
||||
files: this.state.filesToUpload,
|
||||
chunks: this.state.chunks,
|
||||
xhr: this.getXhrErrorComment(xhr)
|
||||
|
@ -13,8 +13,7 @@ import AppConstants from '../constants/application_constants';
|
||||
* @param {boolean} ignoreSentry Defines whether or not the error should be submitted to Sentry
|
||||
* @param {string} comment Will also be submitted to Sentry, but will not be logged
|
||||
*/
|
||||
function logGlobal(error, ignoreSentry = AppConstants.errorMessagesToIgnore.indexOf(error.message) > -1,
|
||||
comment) {
|
||||
function logGlobal(error, comment, ignoreSentry = AppConstants.errorMessagesToIgnore.indexOf(error.message) > -1) {
|
||||
console.error(error);
|
||||
|
||||
if(!ignoreSentry) {
|
||||
@ -24,7 +23,6 @@ function logGlobal(error, ignoreSentry = AppConstants.errorMessagesToIgnore.inde
|
||||
Raven.captureException(error);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export function initLogging() {
|
||||
@ -36,4 +34,4 @@ export function initLogging() {
|
||||
window.onerror = Raven.process;
|
||||
|
||||
console.logGlobal = logGlobal;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user