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
|
@ -731,7 +731,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
await createRoom(createRoomOptions);
|
||||
this.props.onFinished();
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
this.setState({
|
||||
busy: false,
|
||||
errorText: _t("We couldn't create your DM."),
|
||||
|
@ -749,7 +749,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
const cli = MatrixClientPeg.get();
|
||||
const room = cli.getRoom(this.props.roomId);
|
||||
if (!room) {
|
||||
console.error("Failed to find the room to invite users to");
|
||||
logger.error("Failed to find the room to invite users to");
|
||||
this.setState({
|
||||
busy: false,
|
||||
errorText: _t("Something went wrong trying to invite the users."),
|
||||
|
@ -784,7 +784,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
this.setState({
|
||||
busy: false,
|
||||
errorText: _t(
|
||||
|
@ -893,8 +893,8 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
})),
|
||||
});
|
||||
}).catch(e => {
|
||||
console.error("Error searching user directory:");
|
||||
console.error(e);
|
||||
logger.error("Error searching user directory:");
|
||||
logger.error(e);
|
||||
this.setState({ serverResultsMixin: [] }); // clear results because it's moderately fatal
|
||||
});
|
||||
|
||||
|
@ -948,8 +948,8 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
}],
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Error searching identity server:");
|
||||
console.error(e);
|
||||
logger.error("Error searching identity server:");
|
||||
logger.error(e);
|
||||
this.setState({ threepidResultsMixin: [] }); // clear results because it's moderately fatal
|
||||
}
|
||||
}
|
||||
|
@ -1062,8 +1062,8 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
avatar_url: avatarUrl,
|
||||
}));
|
||||
} catch (e) {
|
||||
console.error("Error looking up profile for " + address);
|
||||
console.error(e);
|
||||
logger.error("Error looking up profile for " + address);
|
||||
logger.error(e);
|
||||
failed.push(address);
|
||||
}
|
||||
}
|
||||
|
@ -1513,7 +1513,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
</AccessibleButton>
|
||||
</div>;
|
||||
} else {
|
||||
console.error("Unknown kind of InviteDialog: " + this.props.kind);
|
||||
logger.error("Unknown kind of InviteDialog: " + this.props.kind);
|
||||
}
|
||||
|
||||
const goButton = this.props.kind == KIND_CALL_TRANSFER ? null : <AccessibleButton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue