Skip to content

Commit f9a3f11

Browse files
authored
More informative error message for noniterators
1 parent fd75344 commit f9a3f11

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)