From 408388c6f157f7b4118cf0f95d38964c6b108578 Mon Sep 17 00:00:00 2001 From: Sarah Heimlich Date: Tue, 8 Dec 2020 18:36:05 -0800 Subject: [PATCH] Add error message for CollectionHandle init (#6690) Add error message for CollectionHandle init Closes #6690 COPYBARA_INTEGRATE_REVIEW=https://github.com/polymerlabs/arcs/pull/6690 from SHeimlich:collectionHandle dd7e309d7d188d6bccf7a7d196a58e412c4f0772 PiperOrigin-RevId: 346455417 --- java/arcs/core/entity/CollectionHandle.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/arcs/core/entity/CollectionHandle.kt b/java/arcs/core/entity/CollectionHandle.kt index 466950d58bf..2b35c45597c 100644 --- a/java/arcs/core/entity/CollectionHandle.kt +++ b/java/arcs/core/entity/CollectionHandle.kt @@ -45,7 +45,9 @@ class CollectionHandle( 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.