Skip to content

Commit

Permalink
Turn on gracefulFatalReset in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
c3bryant committed May 7, 2018
1 parent 08d528e commit 04f5241
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/util/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,17 @@ module.exports = {
},

/**
* @param {Object} e Error object with details about the fatal error.
* @param {Object} err Error object with details about the fatal error.
* @returns {function} Resets the app in case of a fatal error.
*/
gracefulFatalReset(e) {
logger.trackException(e.toString(), true)
gracefulFatalReset(err) {
const fatalErr = err.toString()
const fatalErrDev = (__DEV__ ? ('\n' + fatalErr) : '')
logger.trackException(fatalErr, true)

Alert.alert(
'Oops! Something went wrong!',
'An error report has been automatically sent to the technical staff. Try restarting. If the problem still occurs try again later.',
'An error report has been automatically sent to the technical staff. Try restarting. If the problem still occurs try again later.' + fatalErrDev,
[
{
text: 'Quit',
Expand Down

0 comments on commit 04f5241

Please sign in to comment.