diff --git a/kermit-core/src/androidMain/kotlin/co/touchlab/kermit/LogcatWriter.kt b/kermit-core/src/androidMain/kotlin/co/touchlab/kermit/LogcatWriter.kt index f027a521..d02f98b2 100644 --- a/kermit-core/src/androidMain/kotlin/co/touchlab/kermit/LogcatWriter.kt +++ b/kermit-core/src/androidMain/kotlin/co/touchlab/kermit/LogcatWriter.kt @@ -45,7 +45,10 @@ class LogcatWriter(private val messageStringFormatter: MessageStringFormatter = ) } } - } catch (_: Exception) { + } catch (_: Throwable) { + // Catches "RuntimeException: Method d in android.util.Log not mocked" + // or "UnsatisfiedLinkError: 'int android.util.Log.println_native(int, int, java.lang.String, java.lang.String)'" + // when running unit tests. testWriter.log(severity, message, tag, throwable) } }