Merge pull request #181 from grote/kv-state-assertion
Add message to AssertionError to track down why it happens
This commit is contained in:
commit
08414800bb
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue