From 04f524196ed3488f67bbb8aa242c974c72871bb3 Mon Sep 17 00:00:00 2001 From: "Bryant, Charles" Date: Mon, 7 May 2018 11:58:42 -0700 Subject: [PATCH] Turn on gracefulFatalReset in dev --- app/util/general.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/util/general.js b/app/util/general.js index 10d4e3a5c..a5c65690b 100644 --- a/app/util/general.js +++ b/app/util/general.js @@ -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',