Skip to content

Commit

Permalink
Add error message for CollectionHandle init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Heimlich committed Dec 2, 2020
1 parent 2e44b13 commit 0f0ab5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion java/arcs/core/entity/CollectionHandle.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ class CollectionHandle<T : Storable, R : Referencable>(
private val storageAdapter = config.storageAdapter

init {
check(spec.containerType == HandleContainerType.Collection)
check(spec.containerType == HandleContainerType.Collection) {
"Collection container type required for CollectionHandle $name, but got ${spec.containerType}."
}
}

// Filter out expired models.
Expand Down

0 comments on commit 0f0ab5a

Please sign in to comment.