mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Remove image read error logging
Instead of logging the error to Sentry print it to console.
This commit is contained in:
parent
d56c17b887
commit
9c286cceec
1 changed files with 3 additions and 4 deletions
|
|
@ -2,7 +2,6 @@ import React, { Component, PropTypes } from 'react';
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import { Promised } from '../../components';
|
||||
import { error as logError } from '../../util/log';
|
||||
|
||||
import css from './ImageFromFile.css';
|
||||
|
||||
|
|
@ -13,9 +12,9 @@ const readImage = file =>
|
|||
const reader = new FileReader();
|
||||
reader.onload = e => resolve(e.target.result);
|
||||
reader.onerror = e => {
|
||||
const error = new Error(`Error reading ${file.name}: ${e.target.result}`);
|
||||
logError(error, { file: file });
|
||||
reject(error);
|
||||
// eslint-disable-next-line
|
||||
console.error('Error (', e, `) happened while reading ${file.name}: ${e.target.result}`);
|
||||
reject(new Error(`Error reading ${file.name}: ${e.target.result}`));
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue