From b7aedda90c0ed741d95017d0968c8724d39dee35 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Fri, 18 Dec 2020 08:45:18 -0300 Subject: [PATCH] Add message to AssertionError to track down why it happens --- .../com/stevesoltys/seedvault/transport/backup/KVBackup.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/stevesoltys/seedvault/transport/backup/KVBackup.kt b/app/src/main/java/com/stevesoltys/seedvault/transport/backup/KVBackup.kt index 2468f75f..153b0989 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/transport/backup/KVBackup.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/transport/backup/KVBackup.kt @@ -67,7 +67,10 @@ internal class KVBackup( } // initialize state - if (this.state != null) throw AssertionError() + val state = this.state + if (state != null) { + throw AssertionError("Have state for ${state.packageInfo.packageName}") + } this.state = KVBackupState(packageInfo) // no need for backup when no data has changed