Bug 861395 - Part 1: Log the cause exception that we report to Socorro. r=kats

This commit is contained in:
Chris Peterson 2013-04-12 12:56:31 -07:00
parent 58f7f025dc
commit 9b203c52d2

View File

@ -174,9 +174,6 @@ public class GeckoAppShell
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable e) {
Log.e(LOGTAG, ">>> REPORTING UNCAUGHT EXCEPTION FROM THREAD "
+ thread.getId() + " (\"" + thread.getName() + "\")", e);
// If the uncaught exception was rethrown, walk the exception `cause` chain to find
// the original exception so Socorro can correctly collate related crash reports.
Throwable cause;
@ -184,6 +181,9 @@ public class GeckoAppShell
e = cause;
}
Log.e(LOGTAG, ">>> REPORTING UNCAUGHT EXCEPTION FROM THREAD "
+ thread.getId() + " (\"" + thread.getName() + "\")", e);
if (e instanceof java.lang.OutOfMemoryError) {
SharedPreferences prefs =
GeckoApp.mAppContext.getSharedPreferences(GeckoApp.PREFS_NAME, 0);