mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-14 02:53:38 +00:00
23 lines
764 B
Java
23 lines
764 B
Java
|
package org.thoughtcrime.securesms.logging;
|
||
|
|
||
|
import android.support.annotation.NonNull;
|
||
|
|
||
|
public class UncaughtExceptionLogger implements Thread.UncaughtExceptionHandler {
|
||
|
|
||
|
private static final String TAG = UncaughtExceptionLogger.class.getSimpleName();
|
||
|
|
||
|
private final Thread.UncaughtExceptionHandler originalHandler;
|
||
|
private final PersistentLogger persistentLogger;
|
||
|
|
||
|
public UncaughtExceptionLogger(@NonNull Thread.UncaughtExceptionHandler originalHandler, @NonNull PersistentLogger persistentLogger) {
|
||
|
this.originalHandler = originalHandler;
|
||
|
this.persistentLogger = persistentLogger;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void uncaughtException(Thread t, Throwable e) {
|
||
|
Log.e(TAG, "", e);
|
||
|
originalHandler.uncaughtException(t, e);
|
||
|
}
|
||
|
}
|