Erratum

Powerful Error Detector for Android

Preview

If an exception is detected, the exception activity is automatically launched. This activity also contains a button to return to the activity before the exception is thrown.


Download

implementation "io.github.jisungbin:erratum:${version}"

Usage

class App : Application() {
    override fun onCreate() {
        super.onCreate()
        Erratum.setup(application = this)
    }
}

Customize

You can customize the exception activity. In this case, you must unconditionally make your own exception activity extend ErratumExceptionActivity.

class App : Application() {
    override fun onCreate() {
        super.onCreate()
        Erratum.setup(
            application = this,
            registerExceptionActivityIntent = { thread, throwable, lastActivity ->
                Intent(lastActivity, ErrorActivity::class.java) // must return custom exception activity intent
            }
        )
    }
}

You can use the this method in ErratumExceptionActivity.

val exceptionString: String // get exception message

fun openLastActivity() // Closes the current activity and opens the activity before an exception is thrown.

Happy Coding 🙂

GitHub

https://github.com/jisungbin/erratum