Skip to content

Commit cded309

Browse files
committed
Add a diagnostic error
1 parent 5e625a2 commit cded309

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/TestItemControllers.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ mutable struct JSONRPCTestItemController{ERR_HANDLER<:Function}
483483
end
484484

485485
@views function makechunks(X::AbstractVector, n::Integer)
486+
if n<1
487+
error("n is smaller than 1")
488+
end
486489
c = length(X) ÷ n
487490
return [X[1+c*k:(k == n-1 ? end : c*k+c)] for k = 0:n-1]
488491
end

0 commit comments

Comments
 (0)