From 128be894911be6331b6b9b0f49e0bf083f355db1 Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Thu, 2 Apr 2015 15:01:06 -0700 Subject: [PATCH] [react_native] JS files from D1961099: Format stack trace on native side --- .../Initialization/ExceptionsManager.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js b/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js index 7dadeb5bb..d9118b748 100644 --- a/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js +++ b/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js @@ -36,12 +36,12 @@ function handleException(e: Exception) { ); if (RCTExceptionsManager) { - RCTExceptionsManager.reportUnhandledException(e.message, format(stack)); + RCTExceptionsManager.reportUnhandledException(e.message, stack); if (__DEV__) { (sourceMapPromise = sourceMapPromise || loadSourceMap()) .then(map => { var prettyStack = parseErrorStack(e, map); - RCTExceptionsManager.updateExceptionMessage(e.message, format(prettyStack)); + RCTExceptionsManager.updateExceptionMessage(e.message, prettyStack); }) .then(null, error => { console.error('#CLOWNTOWN (error while displaying error): ' + error.message); @@ -71,13 +71,4 @@ function fillSpaces(n) { return new Array(n + 1).join(' '); } -// HACK(frantic) Android currently expects stack trace to be a string #5920439 -function format(stack) { - if (Platform.OS === 'android') { - return stackToString(stack); - } else { - return stack; - } -} - module.exports = { handleException };