Commit ab6311f3 authored by MozLando's avatar MozLando
Browse files

Merge #7733 #7739



7733: Closes #7722: Record uncaught exception in Android log r=pocmo a=rocketsroger



7739:  Docs update (20200716-120922) [ci skip] r=pocmo a=MickeyMoz
Co-authored-by: default avatarRoger Yang <royang@mozilla.com>
Co-authored-by: default avatarMickeyMoz <sebastian@mozilla.com>
......@@ -4,11 +4,14 @@
package mozilla.components.lib.crash.handler
import android.annotation.SuppressLint
import android.content.Context
import android.os.Process
import android.util.Log
import mozilla.components.lib.crash.Crash
import mozilla.components.lib.crash.CrashReporter
private const val TAG = "ExceptionHandler"
/**
* [Thread.UncaughtExceptionHandler] implementation that forwards crashes to the [CrashReporter] instance.
*/
......@@ -18,7 +21,10 @@ class ExceptionHandler(
) : Thread.UncaughtExceptionHandler {
private var crashing = false
@SuppressLint("LogUsage") // We do not want to use our custom logger while handling the crash
override fun uncaughtException(thread: Thread, throwable: Throwable) {
Log.e(TAG, "Uncaught exception handled: ", throwable)
if (crashing) {
return
}
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment