Add message to AssertionError to track down why it happens

This commit is contained in:
Torsten Grote 2020-12-18 08:45:18 -03:00 committed by Chirayu Desai
parent af45233e02
commit 9bba81ed5c

View file

@ -67,7 +67,10 @@ internal class KVBackup(
} }
// initialize state // 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) this.state = KVBackupState(packageInfo)
// no need for backup when no data has changed // no need for backup when no data has changed