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
Родитель 169fd7f216
Коммит 1275edbe5e
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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);