Created
June 7, 2014 13:53
-
-
Save wakim/cd40306adf32c53115af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Application extends android.app.Application implements UncaughtExceptionHandler { | |
private UncaughtExceptionHandler mDefaultExceptionHandler; | |
static Application sApp; | |
@Override | |
public void onCreate() { | |
mDefaultExceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); | |
Thread.setDefaultUncaughtExceptionHandler(this); | |
} | |
@Override | |
public void uncaughtException(Thread thread, Throwable ex) { | |
mDefaultExceptionHandler.uncaughtException(thread, ex); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment