From e3ee53bcd5e27185eb767467c0fc67f465850b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 5 Sep 2023 09:27:14 +0200 Subject: [PATCH] Add error logs --- ComApp/src/App/Views/InstallScreen.js | 1 + ComApp/src/App/Views/SyncScreen.js | 6 ++++-- ComApp/src/App/Views/VideoScreen.js | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ComApp/src/App/Views/InstallScreen.js b/ComApp/src/App/Views/InstallScreen.js index aed1356..fc4024c 100644 --- a/ComApp/src/App/Views/InstallScreen.js +++ b/ComApp/src/App/Views/InstallScreen.js @@ -164,6 +164,7 @@ class InstallScreen extends React.Component { }) .catch(function (error) { Sentry.captureException(error); + console.error(error); Alert.alert(i18n.t('alert.error'), i18n.t('error.error_has_occurred')); return false; }); diff --git a/ComApp/src/App/Views/SyncScreen.js b/ComApp/src/App/Views/SyncScreen.js index 4e97f51..f8e04bd 100644 --- a/ComApp/src/App/Views/SyncScreen.js +++ b/ComApp/src/App/Views/SyncScreen.js @@ -7,6 +7,7 @@ import { initDirectories } from '../Store/Actions/directories'; import { initDocuments } from '../Store/Actions/documents'; // Sentry import * as Sentry from '@sentry/react-native'; + // Style import styles from '../../Resources/Styles/SyncStyle'; // Translations @@ -418,6 +419,7 @@ class SyncScreen extends React.Component { ') ...', }); try { + const uri = `${endpoint}${doc.uuid}.${doc.type}`; await this.downloadResumable( endpoint + doc.uuid + '.' + doc.type, doc.uuid, @@ -427,7 +429,7 @@ class SyncScreen extends React.Component { FileSystem.documentDirectory + doc.uuid + '.' + doc.type, ); SyncController.updateLastModificationDoc(doc.id, modificationTime); - //console.log('Finished downloading to ', uri); + console.debug('Finished downloading to ', uri); this.setState({ progress: this.state.progress + progress }); if (i < documents.length - 1) { return this.download(documents, progress, i + 1); @@ -464,7 +466,7 @@ class SyncScreen extends React.Component { [ { text: i18n.t('global.cancel'), - onPress: () => console.log('Cancel Pressed'), + onPress: () => console.debug('Cancel Pressed'), style: 'cancel', }, { diff --git a/ComApp/src/App/Views/VideoScreen.js b/ComApp/src/App/Views/VideoScreen.js index 30ac216..c761065 100644 --- a/ComApp/src/App/Views/VideoScreen.js +++ b/ComApp/src/App/Views/VideoScreen.js @@ -63,6 +63,7 @@ class VideoScreen extends React.Component { }} errorCallback={e => { console.error(e); + Sentry.captureException(e); }} />