1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 21:52:08 +02:00

Move ignoreSentry parameter of logGlobal to be last in parameter list

This commit is contained in:
Brett Sun 2015-12-14 14:31:53 +01:00
parent d0cef8c836
commit 9342262f5c
3 changed files with 5 additions and 7 deletions

View File

@ -182,7 +182,7 @@ let Form = React.createClass({
delete formData.password; delete formData.password;
} }
console.logGlobal(err, false, formData); console.logGlobal(err, formData);
if(this.props.isInline) { if(this.props.isInline) {
let notification = new GlobalNotificationModel(getLangText('Something went wrong, please try again later'), 'danger'); let notification = new GlobalNotificationModel(getLangText('Something went wrong, please try again later'), 'danger');

View File

@ -440,7 +440,7 @@ const ReactS3FineUploader = React.createClass({
onComplete(id, name, res, xhr) { onComplete(id, name, res, xhr) {
// There has been an issue with the server's connection // There has been an issue with the server's connection
if (xhr && xhr.status === 0 && res.success) { 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, files: this.state.filesToUpload,
chunks: this.state.chunks, chunks: this.state.chunks,
xhr: this.getXhrErrorComment(xhr) xhr: this.getXhrErrorComment(xhr)
@ -498,7 +498,7 @@ const ReactS3FineUploader = React.createClass({
}, },
onError(id, name, errorReason, xhr) { onError(id, name, errorReason, xhr) {
console.logGlobal(errorReason, false, { console.logGlobal(errorReason, {
files: this.state.filesToUpload, files: this.state.filesToUpload,
chunks: this.state.chunks, chunks: this.state.chunks,
xhr: this.getXhrErrorComment(xhr) xhr: this.getXhrErrorComment(xhr)

View File

@ -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 {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 * @param {string} comment Will also be submitted to Sentry, but will not be logged
*/ */
function logGlobal(error, ignoreSentry = AppConstants.errorMessagesToIgnore.indexOf(error.message) > -1, function logGlobal(error, comment, ignoreSentry = AppConstants.errorMessagesToIgnore.indexOf(error.message) > -1) {
comment) {
console.error(error); console.error(error);
if(!ignoreSentry) { if(!ignoreSentry) {
@ -24,7 +23,6 @@ function logGlobal(error, ignoreSentry = AppConstants.errorMessagesToIgnore.inde
Raven.captureException(error); Raven.captureException(error);
} }
} }
} }
export function initLogging() { export function initLogging() {
@ -36,4 +34,4 @@ export function initLogging() {
window.onerror = Raven.process; window.onerror = Raven.process;
console.logGlobal = logGlobal; console.logGlobal = logGlobal;
} }