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 9, 2020
1 parent 80caf63 commit dd7e309
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 containerType required for CollectionHandle $name, but got ${spec.containerType}."
}
}

// Filter out expired models.
Expand Down

0 comments on commit dd7e309

Please sign in to comment.