[FIX] Fix calls to bugsnag.notify (#1165)
This commit is contained in:
parent
0ac1028865
commit
c7791b9a38
|
@ -310,8 +310,8 @@ class MessageActions extends React.Component {
|
|||
try {
|
||||
await RocketChat.reportMessage(actionMessage._id);
|
||||
Alert.alert(I18n.t('Message_Reported'));
|
||||
} catch (err) {
|
||||
log(err);
|
||||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -327,8 +327,8 @@ class MessageActions extends React.Component {
|
|||
if (!translatedMessage) {
|
||||
await RocketChat.translateMessage(actionMessage, room.autoTranslateLanguage);
|
||||
}
|
||||
} catch (err) {
|
||||
log(err);
|
||||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ class MessageBox extends Component {
|
|||
try {
|
||||
RocketChat.executeCommandPreview(command, params, rid, item);
|
||||
} catch (e) {
|
||||
log('onPressCommandPreview', e);
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ class MessageBox extends Component {
|
|||
this.setState({ commandPreview: preview.items });
|
||||
} catch (e) {
|
||||
this.showCommandPreview = false;
|
||||
log('command Preview', e);
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -546,9 +546,9 @@ class MessageBox extends Component {
|
|||
mime: res.type,
|
||||
path: res.uri
|
||||
});
|
||||
} catch (error) {
|
||||
if (!DocumentPicker.isCancel(error)) {
|
||||
log('chooseFile', error);
|
||||
} catch (e) {
|
||||
if (!DocumentPicker.isCancel(e)) {
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ class MessageBox extends Component {
|
|||
const messageWithoutCommand = message.substr(message.indexOf(' ') + 1);
|
||||
RocketChat.runSlashCommand(command, roomId, messageWithoutCommand);
|
||||
} catch (e) {
|
||||
log('slashCommand', e);
|
||||
log(e);
|
||||
}
|
||||
this.clearInput();
|
||||
return;
|
||||
|
|
|
@ -10,7 +10,7 @@ export default function() {
|
|||
const result = await this.sdk.get('commands.list');
|
||||
|
||||
if (!result.success) {
|
||||
log('getSlashCommand fetch', result);
|
||||
console.log(result);
|
||||
return resolve();
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ export default function() {
|
|||
try {
|
||||
database.create('slashCommand', command, true);
|
||||
} catch (e) {
|
||||
log('get_slash_command', e);
|
||||
log(e);
|
||||
}
|
||||
}));
|
||||
return resolve();
|
||||
|
|
|
@ -100,30 +100,30 @@ export function sendFileMessage(rid, fileInfo, tmid, server, user) {
|
|||
database.create('uploads', fileInfo, true);
|
||||
const response = JSON.parse(xhr.response);
|
||||
reject(response);
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
log(err);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
log(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
xhr.onerror = (e) => {
|
||||
xhr.onerror = (error) => {
|
||||
database.write(() => {
|
||||
fileInfo.error = true;
|
||||
try {
|
||||
database.create('uploads', fileInfo, true);
|
||||
reject(error);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
log(err);
|
||||
log(e);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
xhr.send(formData);
|
||||
} catch (err) {
|
||||
log(err);
|
||||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import { View, Text } from 'react-native';
|
|||
import FastImage from 'react-native-fast-image';
|
||||
import { RectButton } from 'react-native-gesture-handler';
|
||||
|
||||
import log from '../../utils/log';
|
||||
import Check from '../../containers/Check';
|
||||
import styles, { ROW_HEIGHT } from './styles';
|
||||
|
||||
|
@ -24,7 +23,7 @@ const ServerItem = React.memo(({
|
|||
}}
|
||||
defaultSource={{ uri: 'logo' }}
|
||||
style={styles.serverIcon}
|
||||
onError={() => log('err_loading_server_icon')}
|
||||
onError={() => console.log('err_loading_server_icon')}
|
||||
/>
|
||||
)
|
||||
: (
|
||||
|
|
|
@ -128,8 +128,8 @@ export default class NotificationPreferencesView extends React.Component {
|
|||
};
|
||||
try {
|
||||
await RocketChat.saveNotificationSettings(this.rid, params);
|
||||
} catch (err) {
|
||||
log('err_save_notification_settings', err);
|
||||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,8 +142,8 @@ export default class NotificationPreferencesView extends React.Component {
|
|||
};
|
||||
try {
|
||||
await RocketChat.saveNotificationSettings(this.rid, params);
|
||||
} catch (err) {
|
||||
log('err_save_notification_settings', err);
|
||||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,8 +98,8 @@ class RoomInfoView extends React.Component {
|
|||
room = result.room;
|
||||
this.setState({ room });
|
||||
}
|
||||
} catch (error) {
|
||||
log('err_get_room_info', error);
|
||||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
const permissions = RocketChat.hasPermission([PERMISSION_EDIT_ROOM], room.rid);
|
||||
|
|
Loading…
Reference in New Issue