Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
9c594a8a96
commit
5e73a212f4
124 changed files with 417 additions and 250 deletions
|
@ -27,6 +27,8 @@ import { replaceableComponent } from "../../../../utils/replaceableComponent";
|
|||
import ErrorDialog from "../../dialogs/ErrorDialog";
|
||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
/*
|
||||
TODO: Improve the UX for everything in here.
|
||||
It's very much placeholder, but it gets the job done. The old way of handling
|
||||
|
@ -78,7 +80,7 @@ export class ExistingEmailAddress extends React.Component<IExistingEmailAddressP
|
|||
MatrixClientPeg.get().deleteThreePid(this.props.email.medium, this.props.email.address).then(() => {
|
||||
return this.props.onRemoved(this.props.email);
|
||||
}).catch((err) => {
|
||||
console.error("Unable to remove contact information: " + err);
|
||||
logger.error("Unable to remove contact information: " + err);
|
||||
Modal.createTrackedDialog('Remove 3pid failed', '', ErrorDialog, {
|
||||
title: _t("Unable to remove contact information"),
|
||||
description: ((err && err.message) ? err.message : _t("Operation failed")),
|
||||
|
@ -181,7 +183,7 @@ export default class EmailAddresses extends React.Component<IProps, IState> {
|
|||
task.addEmailAddress(email).then(() => {
|
||||
this.setState({ continueDisabled: false });
|
||||
}).catch((err) => {
|
||||
console.error("Unable to add email address " + email + " " + err);
|
||||
logger.error("Unable to add email address " + email + " " + err);
|
||||
this.setState({ verifying: false, continueDisabled: false, addTask: null });
|
||||
Modal.createTrackedDialog('Unable to add email address', '', ErrorDialog, {
|
||||
title: _t("Unable to add email address"),
|
||||
|
@ -221,7 +223,7 @@ export default class EmailAddresses extends React.Component<IProps, IState> {
|
|||
"and then click continue again."),
|
||||
});
|
||||
} else {
|
||||
console.error("Unable to verify email address: ", err);
|
||||
logger.error("Unable to verify email address: ", err);
|
||||
Modal.createTrackedDialog('Unable to verify email address', '', ErrorDialog, {
|
||||
title: _t("Unable to verify email address."),
|
||||
description: ((err && err.message) ? err.message : _t("Operation failed")),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue