Created
July 8, 2015 15:33
-
-
Save yishai-glide/7ed5f4b6bdca3c48d087 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private static UncaughtExceptionHandler exceptionHandler = new Thread.UncaughtExceptionHandler() { | |
@Override | |
public void uncaughtException(Thread thread, Throwable ex) { | |
StringWriter sw = new StringWriter(); | |
PrintWriter pw = new PrintWriter(sw); | |
ex.printStackTrace(pw); | |
ex.printStackTrace(); | |
Runnable onPostExecute = new Runnable() { | |
@Override | |
public void run() { | |
Process.killProcess(Process.myPid()); | |
System.exit(10); | |
} | |
}; | |
AppInfo.reportFC(applicationContext, sw.toString(), onPostExecute); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment