How to use the sentry-expo.captureException function in sentry-expo

To help you get started, we’ve selected a few sentry-expo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ckiely91 / acrofever / native / src / timesync.js View on Github external
});
      const end = Date.now();
      const json = await res.json();
      const timestamp = json.result;
      const roundtrip = start - end;
      const thisOffset = timestamp - end + roundtrip / 2;

      if (offset === 0) {
        // Apply first offset immediately
        offset = thisOffset;
      }

      results.push({ roundtrip, offset: thisOffset });
    } catch(e) {
      console.log(e);
      Sentry.captureException(new Error("error fetching time: " + e.message));
    }

    await sleep;
  }

  // calculate the limit for outliers
  const roundtrips = results.map(result => result.roundtrip);
  const limit = median(roundtrips) + std(roundtrips);

  // filter all results which have a roundtrip smaller than the mean+std
  const filtered = results.filter(result => result.roundtrip < limit);
  var offsets = filtered.map(result => result.offset);

  // Now if we have any offsets left, set the main offset to that.
  if (offsets.length > 0) {
    offset = mean(offsets);
github expo / harvard-cs50-app / screens / WeekScreen.js View on Github external
_errorCallback(error) {
    Sentry.captureException(error);
    console.log('Video error: ', error.message, error.type, error.obj);
  }
github expo / harvard-cs50-app / utils / DownloadManager.js View on Github external
const downloadResumable = new FileSystem.DownloadResumable(
          downloadFromStore.url,
          downloadFromStore.fileUri,
          downloadFromStore.options,
          this._createDownloadProgressHandler(id),
          downloadFromStore.resumeData
        );
        this._downloadResumables[id] = downloadResumable;
        const uri = await downloadResumable.resumeAsync();
        if (uri) {
          this._updateStore(id, DOWNLOADED({ uri }));
        }
      } catch (e) {
        console.log('File download error', e);
        Sentry.captureMessage('File download error');
        Sentry.captureException(e);
        this._updateStore(id, ERROR({ message: 'Error downloading file' }));
      } finally {
        delete this._downloadResumables[id];
      }
    }
  }
github nickbclifford / Cronch / expo / App.tsx View on Github external
err => {
				Sentry.captureException(err);
				Alert.alert('Saving Battle Plan Error', err.message);
			}
		);
github nickbclifford / Cronch / expo / pages / CheckUrls.tsx View on Github external
err => {
				this.setState({ checking: false });
				Sentry.captureException(err);
				Alert.alert('Login Error', err.message);
			}
		);
github nickbclifford / Cronch / expo / pages / Login.tsx View on Github external
async register() {
		try {
			await WebBrowser.openBrowserAsync('https://mymicds.net/register');
		} catch (err) {
			Sentry.captureException(err);
		}
	}
github Vivify-Ideas / expo-boilerplate / App.js View on Github external
_handleLoadingError = error => {
    Sentry.captureException(error);
  };
github ckiely91 / acrofever / native / src / screens / lobby / GameCategoryPhase.js View on Github external
Meteor.call('acrofeverChooseCategory', this.props.gameId, category, (err) => {
        if (err) {
          Sentry.captureException(new Error("error in acrofeverChooseCategory: " + err.message));
        }
    });
  }

sentry-expo

Catch your Javascript errors for your production Expo apps!

MIT
Latest version published 10 months ago

Package Health Score

64 / 100
Full package analysis