Skip to content

Commit 28d2611

Browse files
authored
Merge pull request #47 from oxinabox/patch-1
More informative error message for noniterators
2 parents fd75344 + f9a3f11 commit 28d2611

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/source_iterable.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ struct EnumerableIterable{T,S} <: Enumerable
33
end
44

55
function query(source)
6-
IteratorInterfaceExtensions.isiterable(source) || error()
6+
if !IteratorInterfaceExtensions.isiterable(source)
7+
error("$(typeof(source)) does not meet the IteratorInterfaceExtensions.jl API")
8+
end
79
typed_source = IteratorInterfaceExtensions.getiterator(source)
810
T = eltype(typed_source)
911
S = typeof(typed_source)

0 commit comments

Comments
 (0)